fix
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"fusenapi/server/ldap-admin/internal/types"
|
||||
)
|
||||
|
||||
func GetorginationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func GetLdapOrginationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.Request
|
||||
@@ -21,12 +21,12 @@ func GetorginationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
|
||||
// 创建一个业务逻辑层实例
|
||||
l := logic.NewGetorginationsLogic(r.Context(), svcCtx)
|
||||
l := logic.NewGetLdapOrginationsLogic(r.Context(), svcCtx)
|
||||
|
||||
rl := reflect.ValueOf(l)
|
||||
basic.BeforeLogic(w, r, rl)
|
||||
|
||||
resp := l.Getorginations(&req, userinfo)
|
||||
resp := l.GetLdapOrginations(&req, userinfo)
|
||||
|
||||
if !basic.AfterLogic(w, r, rl, resp) {
|
||||
basic.NormalAfterLogic(w, r, resp)
|
||||
@@ -45,7 +45,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/ldap-admin/get_ldap_orginations",
|
||||
Handler: GetorginationsHandler(serverCtx),
|
||||
Handler: GetLdapOrginationsHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
|
||||
Reference in New Issue
Block a user