misc/breaking: remove trailing slashes from endpoints

This commit is contained in:
2025-01-29 15:45:09 -05:00
parent 2e179ca7e6
commit c73180449f
9 changed files with 24 additions and 23 deletions

View File

@@ -119,12 +119,12 @@ class Karma(FastAPI):
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}/", handler, methods=["POST"])
app.add_api_route(f"/{endpoint}", handler, methods=["POST"])
async def top_karma_handler(self, request: Request, data: ValidTopKarmaRequest | None = None):
"""
/karma/top/
/karma/top
Get top keywords for karma
(Requires key)
"""
@@ -149,7 +149,7 @@ class Karma(FastAPI):
async def get_karma_handler(self, data: ValidKarmaRetrievalRequest, request: Request):
"""
/karma/get/
/karma/get
Get current karma value
(Requires key)
"""
@@ -173,7 +173,7 @@ class Karma(FastAPI):
async def modify_karma_handler(self, data: ValidKarmaUpdateRequest, request: Request):
"""
/karma/update/
/karma/update
Update karma count
(Requires key)
"""