feat: settings manage api

This commit is contained in:
Noah Hsu
2022-06-27 17:06:10 +08:00
parent 1a148eee7c
commit 005ded41c3
4 changed files with 109 additions and 1 deletions

View File

@ -41,6 +41,14 @@ func Init(r *gin.Engine) {
driver.GET("/list", controllers.ListDriverItems)
driver.GET("/names", controllers.ListDriverNames)
driver.GET("/items", controllers.GetDriverItems)
setting := admin.Group("/setting")
setting.GET("/list", controllers.ListSettings)
setting.POST("/save", controllers.SaveSettings)
setting.POST("/delete", controllers.DeleteSetting)
public := api.Group("/public")
public.GET("/settings", controllers.PublicSettings)
}
func Cors(r *gin.Engine) {