Skip to content

Commit

Permalink
feat(api): redirect root to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Jan 13, 2025
1 parent fb52ae1 commit 22981bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pfp_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from base64 import urlsafe_b64decode
from jinja2 import Environment, PackageLoader
from typing import Annotated
from fastapi import FastAPI, Query, Response, status, HTTPException
from fastapi import FastAPI, Query, HTTPException
from fastapi.responses import RedirectResponse

from rdfproxy import Page, SPARQLModelAdapter, QueryParameters

Expand All @@ -17,9 +18,9 @@ class PersonParams(QueryParameters):
label: str = None


@app.get("/")
@app.get("/", response_class=RedirectResponse, status_code=302)
def root():
return Response(status_code=status.HTTP_200_OK)
return "/docs"


@app.get("/persons")
Expand Down

0 comments on commit 22981bf

Please sign in to comment.