mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 Clean code https://github.com/siyuan-note/siyuan/pull/6380
This commit is contained in:
parent
1809c27f60
commit
0bc997051e
2 changed files with 4 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ func serveSnippets(c *gin.Context) {
|
||||||
c.Status(404)
|
c.Status(404)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, s := range confSnippets {
|
for _, s := range confSnippets {
|
||||||
if s.Name == name && ("" != ext && s.Type == ext[1:]) {
|
if s.Name == name && ("" != ext && s.Type == ext[1:]) {
|
||||||
c.Header("Content-Type", mime.TypeByExtension(ext))
|
c.Header("Content-Type", mime.TypeByExtension(ext))
|
||||||
|
|
@ -49,6 +49,8 @@ func serveSnippets(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 没有在配置文件中命中时在文件系统上查找
|
||||||
filePath = filepath.Join(util.SnippetsPath, filePath)
|
filePath = filepath.Join(util.SnippetsPath, filePath)
|
||||||
c.File(filePath)
|
c.File(filePath)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ var (
|
||||||
AppearancePath string // 配置目录下的外观目录 appearance/ 路径
|
AppearancePath string // 配置目录下的外观目录 appearance/ 路径
|
||||||
ThemesPath string // 配置目录下的外观目录下的 themes/ 路径
|
ThemesPath string // 配置目录下的外观目录下的 themes/ 路径
|
||||||
IconsPath string // 配置目录下的外观目录下的 icons/ 路径
|
IconsPath string // 配置目录下的外观目录下的 icons/ 路径
|
||||||
SnippetsPath string // 数据目录下的 snippets/ 路径
|
SnippetsPath string // 数据目录下的 snippets/ 路径
|
||||||
|
|
||||||
AndroidNativeLibDir string // Android 库路径
|
AndroidNativeLibDir string // Android 库路径
|
||||||
AndroidPrivateDataDir string // Android 私有数据路径
|
AndroidPrivateDataDir string // Android 私有数据路径
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue