feat: API Fixes and Adjustments (#23)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alexandre Teles (afterSt0rm)
2023-07-19 23:32:48 -03:00
committed by GitHub
parent 1273f9224b
commit b18097e030
24 changed files with 563 additions and 565 deletions

View File

@@ -10,7 +10,7 @@ from sanic.response import JSONResponse, json
from sanic_ext import openapi
from api.models.donations import DonationsResponseModel
from config import donation_info, api_version
from config import api_version, wallets, links
donations: Blueprint = Blueprint("donations", version=api_version)
@@ -27,5 +27,10 @@ async def root(request: Request) -> JSONResponse:
**Returns:**
- JSONResponse: A Sanic JSONResponse instance containing a dictionary with the donation links and wallets.
"""
data: dict[str, dict] = {"donations": donation_info}
data: dict[str, dict] = {
"donations": {
"wallets": wallets,
"links": links,
}
}
return json(data, status=200)