From 4ccc88e0bb4ac679ceff130be5d8490caf1646b4 Mon Sep 17 00:00:00 2001 From: ml729 <85370083+ml729@users.noreply.github.com> Date: Fri, 20 Jan 2023 12:59:24 -0500 Subject: [PATCH] fix admin status api handler comments --- website/src/pages/api/admin/stats.ts | 2 +- website/src/pages/api/admin/tasks_availability.ts | 2 +- website/src/pages/api/admin/tree_manager.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/api/admin/stats.ts b/website/src/pages/api/admin/stats.ts index dfc4768b..7f8a43a0 100644 --- a/website/src/pages/api/admin/stats.ts +++ b/website/src/pages/api/admin/stats.ts @@ -1,7 +1,7 @@ import { withRole } from "src/lib/auth"; /** - * Returns the messages recorded by the backend for a user. + * Returns the message stats. */ const handler = withRole("admin", async (req, res) => { const statsRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/stats/`, { diff --git a/website/src/pages/api/admin/tasks_availability.ts b/website/src/pages/api/admin/tasks_availability.ts index 687daa36..c7f1d1c5 100644 --- a/website/src/pages/api/admin/tasks_availability.ts +++ b/website/src/pages/api/admin/tasks_availability.ts @@ -1,7 +1,7 @@ import { withRole } from "src/lib/auth"; /** - * Returns the messages recorded by the backend for a user. + * Returns result of tasks availability query using a dummy user. */ const handler = withRole("admin", async (req, res) => { const tasksAvailabilityRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/tasks/availability`, { diff --git a/website/src/pages/api/admin/tree_manager.ts b/website/src/pages/api/admin/tree_manager.ts index b47562bf..c127f635 100644 --- a/website/src/pages/api/admin/tree_manager.ts +++ b/website/src/pages/api/admin/tree_manager.ts @@ -1,7 +1,7 @@ import { withRole } from "src/lib/auth"; /** - * Returns the messages recorded by the backend for a user. + * Returns tree manager stats. */ const handler = withRole("admin", async (req, res) => { const treeManagerRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/stats/tree_manager`, {