feat: improve on api structure, add openapi tags (#2295)
this logically groups api endpoints and gioves them specific openapi tags. which makes them nice on the `/docs` endpoint and makes the `api.py` more approachable * add wallets list endpoint * remove trailing slashes from endpoints * fixup topup url * fix trailing slash on auth * backwards compatibility
This commit is contained in:
@@ -24,10 +24,10 @@ from ..crud import (
|
||||
get_webpush_subscription,
|
||||
)
|
||||
|
||||
webpush_router = APIRouter(prefix="/api/v1/webpush", tags=["webpush"])
|
||||
webpush_router = APIRouter(prefix="/api/v1/webpush", tags=["Webpush"])
|
||||
|
||||
|
||||
@webpush_router.post("/", status_code=HTTPStatus.CREATED)
|
||||
@webpush_router.post("", status_code=HTTPStatus.CREATED)
|
||||
async def api_create_webpush_subscription(
|
||||
request: Request,
|
||||
data: CreateWebPushSubscription,
|
||||
@@ -49,7 +49,7 @@ async def api_create_webpush_subscription(
|
||||
)
|
||||
|
||||
|
||||
@webpush_router.delete("/", status_code=HTTPStatus.OK)
|
||||
@webpush_router.delete("", status_code=HTTPStatus.OK)
|
||||
async def api_delete_webpush_subscription(
|
||||
request: Request,
|
||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||
|
||||
Reference in New Issue
Block a user