This commit is contained in:
Daniel 2025-03-26 12:23:07 +08:00
parent bd59a69d51
commit 038d05d0f4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 7 additions and 0 deletions

View file

@ -80,6 +80,12 @@ func moveLocalShorthands(c *gin.Context) {
ret.Msg = err.Error()
return
}
if "" == id {
ret.Code = 1
ret.Msg = "No local shorthands need to move"
return
}
ret.Data = id
model.FlushTxQueue()

View file

@ -126,6 +126,7 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/filetree/upsertIndexes", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, upsertIndexes)
ginServer.Handle("POST", "/api/filetree/removeIndexes", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, removeIndexes)
ginServer.Handle("POST", "/api/filetree/listDocTree", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, listDocTree)
ginServer.Handle("POST", "/api/filetree/moveLocalShorthands", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, moveLocalShorthands)
ginServer.Handle("POST", "/api/format/autoSpace", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, autoSpace)
ginServer.Handle("POST", "/api/format/netImg2LocalAssets", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, netImg2LocalAssets)