tianyuan-api-server/apps/gateway/internal/handler/user/getsecretinfohandler.go

22 lines
522 B
Go
Raw Normal View History

2024-10-02 00:57:17 +08:00
package user
import (
"net/http"
xhttp "github.com/zeromicro/x/http"
"tianyuan-api/apps/gateway/internal/logic/user"
"tianyuan-api/apps/gateway/internal/svc"
)
func GetSecretInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := user.NewGetSecretInfoLogic(r.Context(), svcCtx)
resp, err := l.GetSecretInfo()
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
} else {
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
}
}
}