mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 12:52:19 +01:00
filters endpoint added
This commit is contained in:
17
backend/endpoints/filters.py
Normal file
17
backend/endpoints/filters.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from endpoints.responses.filters import FiltersReturn
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/filters")
|
||||
def stats() -> FiltersReturn:
|
||||
"""Endpoint to return the current RomM stats
|
||||
|
||||
Returns:
|
||||
dict: Dictionary with all the stats
|
||||
"""
|
||||
|
||||
return {
|
||||
"genres": ["Role-playing (RPG)", "Turn-based strategy (TBS)", "Adventure"]
|
||||
}
|
||||
5
backend/endpoints/responses/filters.py
Normal file
5
backend/endpoints/responses/filters.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
|
||||
class FiltersReturn(TypedDict):
|
||||
genres: list[str]
|
||||
Reference in New Issue
Block a user