mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-30 04:05:16 +01:00
🎨 Support for listing missing files in Settings - Assets https://github.com/siyuan-note/siyuan/issues/8383
This commit is contained in:
parent
17d8c79057
commit
558f1cdabc
4 changed files with 79 additions and 0 deletions
|
|
@ -210,6 +210,16 @@ func getUnusedAssets(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func getMissingAssets(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
missingAssets := model.MissingAssets()
|
||||
ret.Data = map[string]interface{}{
|
||||
"missingAssets": missingAssets,
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAssetPath(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/asset/setFileAnnotation", model.CheckAuth, model.CheckReadonly, setFileAnnotation)
|
||||
ginServer.Handle("POST", "/api/asset/getFileAnnotation", model.CheckAuth, getFileAnnotation)
|
||||
ginServer.Handle("POST", "/api/asset/getUnusedAssets", model.CheckAuth, getUnusedAssets)
|
||||
ginServer.Handle("POST", "/api/asset/getMissingAssets", model.CheckAuth, getMissingAssets)
|
||||
ginServer.Handle("POST", "/api/asset/removeUnusedAsset", model.CheckAuth, model.CheckReadonly, removeUnusedAsset)
|
||||
ginServer.Handle("POST", "/api/asset/removeUnusedAssets", model.CheckAuth, model.CheckReadonly, removeUnusedAssets)
|
||||
ginServer.Handle("POST", "/api/asset/getDocImageAssets", model.CheckAuth, model.CheckReadonly, getDocImageAssets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue