From 0cd0b136fbc81eef043fe1130f982898d9526158 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Fri, 11 Apr 2025 04:14:28 +0000 Subject: [PATCH] Remove admin-only user listing endpoint from documentation Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/06732ee7-d10c-4148-8f3c-ef55a9b3e6f2.jpg --- server/routes.ts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/server/routes.ts b/server/routes.ts index 8b34dd6..d911fb8 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -455,28 +455,7 @@ export async function registerRoutes(app: Express): Promise { } }); - /** - * @swagger - * /api/users: - * get: - * summary: List all users (admin only) - * tags: [Users] - * security: - * - cookieAuth: [] - * responses: - * 200: - * description: A list of users - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/User' - * 401: - * $ref: '#/components/responses/UnauthorizedError' - * 403: - * description: Forbidden - admin access required - */ + // Removed from Swagger documentation - non-AD user endpoint app.get("/api/users", requireAdmin, async (req, res, next) => { try { const users = await storage.listUsers();