MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / GetSetting

Function GetSetting

server/handles/setting.go:30–48  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

28}
29
30func GetSetting(c *gin.Context) {
31 key := c.Query("key")
32 keys := c.Query("keys")
33 if key != "" {
34 item, err := op.GetSettingItemByKey(key)
35 if err != nil {
36 common.ErrorResp(c, err, 400)
37 return
38 }
39 common.SuccessResp(c, item)
40 } else {
41 items, err := op.GetSettingItemInKeys(strings.Split(keys, ","))
42 if err != nil {
43 common.ErrorResp(c, err, 400)
44 return
45 }
46 common.SuccessResp(c, items)
47 }
48}
49
50func SaveSettings(c *gin.Context) {
51 var req []model.SettingItem

Callers

nothing calls this directly

Calls 4

GetSettingItemByKeyFunction · 0.92
ErrorRespFunction · 0.92
SuccessRespFunction · 0.92
GetSettingItemInKeysFunction · 0.92

Tested by

no test coverage detected