diff options
Diffstat (limited to 'thallium-backend/src/routes/debug.py')
| -rw-r--r-- | thallium-backend/src/routes/debug.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/thallium-backend/src/routes/debug.py b/thallium-backend/src/routes/debug.py new file mode 100644 index 0000000..7fe42da --- /dev/null +++ b/thallium-backend/src/routes/debug.py @@ -0,0 +1,29 @@ +import logging + +from fastapi import APIRouter + +from src.settings import PrintfulClient + +router = APIRouter(tags=["debug"]) +log = logging.getLogger(__name__) + + [email protected]("/templates") +async def get_templates(client: PrintfulClient) -> dict: + """Return all templates in printful.""" + resp = await client.get("/product-templates") + return resp.json() + + [email protected]("/oauth-scopes-v1") +async def get_oauth_scopes(client: PrintfulClient) -> dict: + """Return all templates in printful.""" + resp = await client.get("/oauth/scopes") + return resp.json() + + [email protected]("/oauth-scopes-v2") +async def get_v2_oauth_scopes(client: PrintfulClient) -> dict: + """Return all templates in printful.""" + resp = await client.get("/v2/oauth-scopes") + return resp.json() |