TinySkin/handle/config.go
2023-10-06 00:51:11 +08:00

22 lines
413 B
Go

package handle
import (
"encoding/json"
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/xmdhs/authlib-skin/model"
)
func (h *Handel) GetConfig() httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
ctx := r.Context()
c := h.webService.GetConfig(ctx)
m := model.API[model.Config]{
Code: 0,
Data: c,
}
json.NewEncoder(w).Encode(m)
}
}