Files
sundynix-micro-be/app/plant/api/internal/handler/userProfile/getmybadgeshandler.go
T
2026-05-23 13:55:05 +08:00

21 lines
512 B
Go

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 GetMyBadgesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := userProfile.NewGetMyBadgesLogic(r.Context(), svcCtx)
resp, err := l.GetMyBadges()
if err != nil {
response.Fail(w, err.Error())
} else {
response.OkWithData(w, resp)
}
}
}