Commit Graph

11 Commits

Author SHA1 Message Date
Michael Manganiello
8abbae4c02 misc: Make backend handle URLs with trailing slash
According to multiple FastAPI discussions [1], FastAPI only includes a
built-in mechanism to redirect requests including a trailing slash, to
its variation without slash, using a `307` status code.

This can be an issue when certain clients do not send the same headers
on the redirected request.

This change adds a custom FastAPI `APIRouter`, that registers both route
path variations (with and without trailing slash), while only marking
the path without slash for being included in the OpenAPI schema.

[1] https://github.com/fastapi/fastapi/discussions/7298
2024-08-07 00:22:21 -03:00
Georges-Antoine Assi
880345f20c ruff-only pre-commit 2024-05-18 12:05:57 -04:00
Georges-Antoine Assi
c47167d98c remove mame task for tasks endpoint 2024-05-08 13:45:11 -04:00
Georges-Antoine Assi
4174b9753e remove mame from scheduled tasks and embed fixture 2024-03-26 16:49:02 -04:00
Georges-Antoine Assi
af56074b72 fix endpoint running tests manually 2024-03-12 10:06:55 -04:00
Zurdi
42065aec7c backend refactor as RESTful 2024-01-15 13:34:18 +01:00
Zurdi
1d2c9e7d05 standarized GET endpoints for roms and platforms 2024-01-14 02:34:37 +01:00
Zurdi
4b9e76f550 backend structure refactor 2024-01-12 23:44:27 +01:00
Zurdi
33b6364c8a endpoints and responses restructured 2024-01-11 23:57:06 +01:00
Zurdi
eea7e41940 docstrings added to endpoints + organized imports + formatted code 2024-01-09 16:22:31 +01:00
Georges-Antoine Assi
1e72672b20 Option to manually run tasks 2023-12-04 13:40:33 -05:00