From 1e993026a0270eb49a2c9a90ba7ade0e8895fc61 Mon Sep 17 00:00:00 2001 From: Radical Date: Sat, 31 May 2025 14:52:42 +0200 Subject: [PATCH 1/2] fix: add missing /stats to docs --- src/api/v1/stats.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/v1/stats.rs b/src/api/v1/stats.rs index 5877c00..760ec71 100644 --- a/src/api/v1/stats.rs +++ b/src/api/v1/stats.rs @@ -24,7 +24,7 @@ struct Response { build_number: String, } -/// `GET /api/v1/` Returns stats about the server +/// `GET /api/v1/stats` Returns stats about the server /// /// requires auth: no /// From 4fce2625518df3da139219cdf940a4eb449ae05e Mon Sep 17 00:00:00 2001 From: Radical Date: Sat, 31 May 2025 14:52:57 +0200 Subject: [PATCH 2/2] docs: add documentation to logout endpoint --- src/api/v1/auth/logout.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api/v1/auth/logout.rs b/src/api/v1/auth/logout.rs index 79b5c36..d801ad7 100644 --- a/src/api/v1/auth/logout.rs +++ b/src/api/v1/auth/logout.rs @@ -8,7 +8,15 @@ use crate::{ schema::refresh_tokens::{self, dsl}, }; -// TODO: Should maybe be a delete request? +/// `GET /api/v1/logout` +/// +/// requires auth: kinda, needs refresh token set but no access token is technically required +/// +/// ### Responses +/// 200 Logged out +/// 404 Refresh token is invalid +/// 401 Unauthorized (no refresh token found) +/// #[post("/logout")] pub async fn res( req: HttpRequest,