mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
500 B
Go
27 lines
500 B
Go
package user
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"oa/errs"
|
|
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
|
"oa/internal/logic/user"
|
|
"oa/internal/svc"
|
|
"oa/internal/types"
|
|
)
|
|
|
|
func GetHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
var req types.GetReq
|
|
if err := httpx.Parse(r, &req); err != nil {
|
|
errs.Response(w, nil, err)
|
|
return
|
|
}
|
|
|
|
l := user.NewGetLogic(r.Context(), svcCtx)
|
|
resp, err := l.Get(&req)
|
|
errs.Response(w, resp, err)
|
|
}
|
|
}
|