mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
✨ 增加公共代码 js/css 片段 https://github.com/siyuan-note/siyuan/issues/6143
This commit is contained in:
parent
5aa5764974
commit
3c4af0fc85
2 changed files with 13 additions and 3 deletions
|
@ -42,7 +42,13 @@ func getSnippet(c *gin.Context) {
|
|||
enabled = false
|
||||
}
|
||||
|
||||
confSnippets := model.LoadSnippets()
|
||||
confSnippets, err := model.LoadSnippets()
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = "load snippets failed: " + err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
var snippets []*conf.Snippet
|
||||
for _, s := range confSnippets {
|
||||
if ("all" == typ || s.Type == typ) && (2 == enabledArg || s.Enabled == enabled) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue