heritage-api/handler/option-handler.go

20 lines
404 B
Go
Raw Normal View History

2026-03-18 09:18:06 +00:00
package handler
import (
"net/http"
"github.com/gin-gonic/gin"
"myschools.me/heritage/heritage-api/service"
)
// 系统选项map
func OptionMap(c *gin.Context) {
name := c.Query("name")
optionMap, err := service.OptionMap(&name)
if err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"data": "查询失败"})
return
}
c.JSON(http.StatusOK, gin.H{"data": optionMap})
}