From ab8f006e361c132e619cf0df03f720f449866aba Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Fri, 11 Apr 2025 04:15:57 +0000 Subject: [PATCH] Remove API token and dashboard summary endpoints 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/a19cb2ef-55f7-400d-9ada-0a5f1d3cb82e.jpg --- server/routes.ts | 60 +++--------------------------------------------- 1 file changed, 3 insertions(+), 57 deletions(-) diff --git a/server/routes.ts b/server/routes.ts index d911fb8..25f8176 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -366,26 +366,7 @@ export async function registerRoutes(app: Express): Promise { } }); - /** - * @swagger - * /api/tokens: - * get: - * summary: List all API tokens for current user - * tags: [API Tokens] - * security: - * - cookieAuth: [] - * responses: - * 200: - * description: A list of API tokens - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/ApiToken' - * 401: - * $ref: '#/components/responses/UnauthorizedError' - */ + // Removed from Swagger documentation - API Tokens endpoint app.get("/api/tokens", async (req, res, next) => { try { if (!req.isAuthenticated()) { @@ -399,28 +380,7 @@ export async function registerRoutes(app: Express): Promise { } }); - /** - * @swagger - * /api/tokens/{id}: - * delete: - * summary: Delete an API token - * tags: [API Tokens] - * security: - * - cookieAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Token deleted successfully - * 401: - * $ref: '#/components/responses/UnauthorizedError' - * 404: - * $ref: '#/components/responses/NotFoundError' - */ + // Removed from Swagger documentation - API Tokens endpoint app.delete("/api/tokens/:id", async (req, res, next) => { try { if (!req.isAuthenticated()) { @@ -5182,21 +5142,7 @@ export async function registerRoutes(app: Express): Promise { } }); - /** - * @swagger - * /api/dashboard-summary: - * get: - * summary: Get summary statistics for the dashboard - * tags: [Dashboard] - * security: - * - cookieAuth: [] - * - bearerAuth: [] - * responses: - * 200: - * description: Summary statistics for the dashboard - * 401: - * $ref: '#/components/responses/UnauthorizedError' - */ + // Removed from Swagger documentation - Dashboard endpoint app.get("/api/dashboard-summary", requireAuth({ allowApiToken: true }), async (req, res, next) => { try { // Get data from the first available LDAP connection