mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Marketplace introduction page https://github.com/siyuan-note/siyuan/issues/8324
This commit is contained in:
parent
b50dd5dca5
commit
1d5365294f
4 changed files with 62 additions and 0 deletions
|
|
@ -29,6 +29,35 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func setBazaar(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
param, err := gulu.JSON.MarshalJSON(arg)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
bazaar := &conf.Bazaar{}
|
||||
if err = gulu.JSON.UnmarshalJSON(param, bazaar); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
model.Conf.Bazaar = bazaar
|
||||
model.Conf.Save()
|
||||
|
||||
ret.Data = bazaar
|
||||
}
|
||||
|
||||
func setAI(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue