part set config
This commit is contained in:
parent
fd4234de77
commit
5a60e898ed
|
@ -14,6 +14,15 @@ func about(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func setConfig(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
ctxData := ctx.Value(server.RequestCtxKey("ctxData")).(map[string]interface{})
|
||||
data, ok := ctxData["data"]
|
||||
if !ok {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
t := data.(model.HttpServerConfig)
|
||||
model.SetServerConfig(&t)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue