This commit is contained in:
parent
883898f053
commit
f816d897c5
2 changed files with 6 additions and 2 deletions
|
@ -183,8 +183,8 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/ref/getBackmentionDoc", model.CheckAuth, getBackmentionDoc)
|
||||
|
||||
ginServer.Handle("POST", "/api/attr/getBookmarkLabels", model.CheckAuth, getBookmarkLabels)
|
||||
ginServer.Handle("POST", "/api/attr/resetBlockAttrs", model.CheckAuth, model.CheckReadonly, model.CheckReadonly, resetBlockAttrs)
|
||||
ginServer.Handle("POST", "/api/attr/setBlockAttrs", model.CheckAuth, model.CheckReadonly, model.CheckReadonly, setBlockAttrs)
|
||||
ginServer.Handle("POST", "/api/attr/resetBlockAttrs", model.CheckAuth, model.CheckReadonly, resetBlockAttrs)
|
||||
ginServer.Handle("POST", "/api/attr/setBlockAttrs", model.CheckAuth, setBlockAttrs)
|
||||
ginServer.Handle("POST", "/api/attr/getBlockAttrs", model.CheckAuth, getBlockAttrs)
|
||||
|
||||
ginServer.Handle("POST", "/api/cloud/getCloudSpace", model.CheckAuth, getCloudSpace)
|
||||
|
|
|
@ -93,6 +93,10 @@ func SetBlockReminder(id string, timed string) (err error) {
|
|||
}
|
||||
|
||||
func SetBlockAttrs(id string, nameValues map[string]string) (err error) {
|
||||
if util.ReadOnly {
|
||||
return
|
||||
}
|
||||
|
||||
WaitForWritingFiles()
|
||||
|
||||
tree, err := loadTreeByBlockID(id)
|
||||
|
|
Loading…
Add table
Reference in a new issue