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
Michael Manganiello
aced1f1ff2
misc: Migrate IGDBBaseHandler to async
...
Convert `IGDBBaseHandler` methods to be asynchronous, and use an `httpx`
async client, instead of `requests` sync client.
This change also removes the direct dependency with `requests`, as the
project no longer uses it, preferring `httpx` instead.
2024-07-26 21:19:01 -03:00
zurdi
1d6ba70080
collections get_roms endpoint added
2024-07-02 14:31:27 +02:00
Georges-Antoine Assi
7530fdd576
mega refactor of pr
2024-07-01 15:12:07 -04:00
zurdi
15f7522da5
rom db hanlder refactor to adapt to user_rom_props
2024-07-01 15:30:14 +02:00
zurdi
66e185db47
Merge branch 'master' into feature/fav_for_siblings
2024-07-01 08:34:04 +02:00
Michael Manganiello
8281d5679b
misc: Split database handler logic to get/list entities
...
The current implementation for some of the database handlers, where the
same method is used to retrieve either a single entity (when an `id` is
passed), a list of entities, or `None`, makes the typing and overall
design more complex.
This change simplifies database handlers, by having two separate methods
where appropiate:
* A method that receives an `id`, and returns either an entity, or `None`.
* A method that optionally receives filters, and returns (depending on
the current handler implementation) a list of entities, or a `Select`
object that allows chaining more SQLAlchemy operations.
2024-06-30 13:12:48 -03:00
zurdi
0a0bab6730
migrated rom_notes to user_rom_props
2024-06-29 11:26:16 +02:00
Zurdi
1454395c78
Update backend/endpoints/platform.py
...
Co-authored-by: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com >
2024-06-28 22:47:33 +02:00
Zurdi
1390cb1990
fixed datetime serialization on socketio dump
2024-06-28 19:14:02 +02:00
zurdi
a282384bb5
fixed platform error on gallery
2024-06-28 14:23:51 +02:00
zurdi
87d7eb51a5
fixed supported platforms endpoint
2024-06-28 12:31:31 +02:00
zurdi
4fe9abe418
refactor all configuration views
2024-06-12 20:07:32 +02:00
Georges-Antoine Assi
fcb34f9088
Merge branch 'master' into trunk-io
2024-05-23 10:06:13 -04:00
Georges-Antoine Assi
1840390c8a
finish mypy fixes
2024-05-21 21:28:17 -04:00
Georges-Antoine Assi
66510c0327
Improve fetch times of platforms endpoint
2024-05-18 17:24:07 -04:00
Georges-Antoine Assi
2749aaee4a
rename back to old names
2024-05-05 16:59:30 -04:00
Georges-Antoine Assi
9ad28f3294
more refactoring again
2024-05-05 16:32:40 -04:00
Georges-Antoine Assi
def2608c28
refactor db handlers
2024-05-05 15:46:07 -04:00
Georges-Antoine Assi
1a2c914045
refactor handlers out into own files
2024-05-05 12:45:56 -04:00
Georges-Antoine Assi
e64b6728b0
add endpoints for firmware
2024-05-01 17:38:12 -04:00
zurdi
d3864ff02b
create platform if not exists when adding roms fixed
2024-04-11 01:39:58 +02:00
zurdi
c8db7681d3
added all supported platforms to upload rom dialog
2024-04-10 22:45:59 +02:00
Zurdi
b122e93db2
remove unused code
2024-04-09 13:48:29 +02:00
zurdi
df047cc5e9
upload roms button in drawer added
2024-04-08 18:31:02 +02:00
zurdi
d784928884
Merge branch 'mobygames-new-api' into feature/add_platform
2024-03-19 17:57:02 +01:00
Zurdi
ec0875b2aa
return availability message for WIP endpoints
2024-03-10 11:17:09 +01:00
Zurdi
1af05d447b
add platform endpoint added
2024-02-11 00:36:56 +01:00
Georges-Antoine Assi
81b5bcf9ba
refactor handler names
2024-01-18 14:04:35 -05:00
Zurdi
cc0dffe5e6
fixed delete endpoints
2024-01-17 18:36:35 +01: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
93f6cb7651
Merge branch 'feature/manage_config_from_ui' into refactor/backend
2024-01-13 02:17:19 +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
de14ad09be
webrdace moduled
2024-01-11 21:55:15 +01:00
Zurdi
47a83a525b
config is loaded dinamycally and platform bindings can be removed from UI
2024-01-11 15:26:41 +01:00
Zurdi
eea7e41940
docstrings added to endpoints + organized imports + formatted code
2024-01-09 16:22:31 +01:00
Zurdi
ffebd55ddb
fix remove platform
2024-01-08 23:01:27 +01:00
Georges-Antoine Assi
957d06e883
Platform delete only removes from DB
2024-01-08 15:15:43 -05:00
Georges-Antoine Assi
fd752ddf90
small cleanup fixes
2024-01-05 09:01:15 -05:00
Zurdi
78152d91ee
added backend endpoint to remove a platform
2024-01-05 11:48:56 +01:00
Zurdi
dc9cd1cd59
added front components to remove a platform
2024-01-05 09:24:16 +01:00
Georges-Antoine Assi
bd245cec4a
Change urls to specify webrcade
2023-12-28 13:02:00 -05:00
Georges-Antoine Assi
cfb5e29184
Make some code more explcit
2023-12-27 19:42:26 -05:00
Georges-Antoine Assi
4b97e21f46
Merge branch 'master' into webrcade-feed
2023-12-27 19:34:58 -05:00
Georges-Antoine Assi
50789af6a0
Switch orm_mode to new key
2023-11-06 12:41:05 -05:00
Georges-Antoine Assi
0bc8994a07
Expand slug to type map
2023-09-17 11:51:14 -04:00
Georges-Antoine Assi
347bee8823
Fix feed meta
2023-09-17 11:36:43 -04:00
Georges-Antoine Assi
8457ab3508
Add endpoint to generate webrcade feed
2023-09-17 11:23:01 -04:00