新增部门列表

This commit is contained in:
laodaming
2023-11-14 11:26:08 +08:00
parent 561ce385a1
commit 15671c02c3
7 changed files with 55 additions and 62 deletions

View File

@@ -14,7 +14,7 @@ import (
func GetDepartmentsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.GetDepartmentsReq
var req types.Request
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
if err != nil {
return

View File

@@ -13,7 +13,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodPost,
Method: http.MethodGet,
Path: "/api/ldap-admin/get_departments",
Handler: GetDepartmentsHandler(serverCtx),
},