add
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
admin_role "ycc-server/app/main/api/internal/handler/admin_role"
|
||||
admin_role_api "ycc-server/app/main/api/internal/handler/admin_role_api"
|
||||
admin_user "ycc-server/app/main/api/internal/handler/admin_user"
|
||||
admin_whitelist "ycc-server/app/main/api/internal/handler/admin_whitelist"
|
||||
agent "ycc-server/app/main/api/internal/handler/agent"
|
||||
app "ycc-server/app/main/api/internal/handler/app"
|
||||
auth "ycc-server/app/main/api/internal/handler/auth"
|
||||
@@ -653,6 +654,40 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1/admin/user"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/batch-create",
|
||||
Handler: admin_whitelist.AdminBatchCreateWhitelistHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/create",
|
||||
Handler: admin_whitelist.AdminCreateWhitelistHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodDelete,
|
||||
Path: "/delete/:id",
|
||||
Handler: admin_whitelist.AdminDeleteWhitelistHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/list",
|
||||
Handler: admin_whitelist.AdminGetWhitelistListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPut,
|
||||
Path: "/update/:id",
|
||||
Handler: admin_whitelist.AdminUpdateWhitelistHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/v1/admin/whitelist"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user