Files
sundynix-micro-be/app/plant/api/internal/handler/userProfile/getUserProfileHandler.go
T
2026-04-27 00:02:18 +08:00

26 lines
584 B
Go

// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1
package userProfile
import (
"net/http"
"sundynix-micro-go/app/plant/api/internal/logic/userProfile"
"sundynix-micro-go/app/plant/api/internal/svc"
"sundynix-micro-go/common/response"
)
// 获取用户资料
func GetUserProfileHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := userProfile.NewGetUserProfileLogic(r.Context(), svcCtx)
err := l.GetUserProfile()
if err != nil {
response.Fail(w, err.Error())
} else {
response.Ok(w)
}
}
}