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.
OneAuth/oa/internal/handler/user/listhandler.go

27 lines
504 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 ListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ListReq
if err := httpx.Parse(r, &req); err != nil {
errs.Response(w, nil, err)
return
}
l := user.NewListLogic(r.Context(), svcCtx)
resp, err := l.List(&req)
errs.Response(w, resp, err)
}
}