Commit Graph

32 Commits

Author SHA1 Message Date
Georges-Antoine Assi
7530fdd576 mega refactor of pr 2024-07-01 15:12:07 -04: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
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -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
f67b984cbb Hotfix scanning via watcher 2024-02-09 18:16:59 -05:00
Georges-Antoine Assi
aae717b34e update some conftest 2024-02-01 23:27:33 -05:00
Georges-Antoine Assi
0ca6d74c26 Add file_name_no_ext column 2024-01-20 15:09:11 -05:00
Georges-Antoine Assi
81b5bcf9ba refactor handler names 2024-01-18 14:04:35 -05:00
Georges-Antoine Assi
86b55c68a3 fix circular import + migration 15 downgrade 2024-01-18 13:44:07 -05:00
Georges-Antoine Assi
9495942084 Fix the rest of the tests 2024-01-17 10:57:07 -05:00
Georges-Antoine Assi
7963e243dc Fix batch of test fixes 2024-01-17 10:26:37 -05:00
Zurdi
0af3ffb86f refactor stats and user handlers 2024-01-17 01:43:16 +01:00
Zurdi
77694c6f0e Merge remote-tracking branch 'origin/stats-endpoint' into refactor/backend 2024-01-16 22:25:27 +01:00
Georges-Antoine Assi
33645641b8 Add stats endpoint + refactor rom file size 2024-01-16 11:06:05 -05:00
Zurdi
93f6cb7651 Merge branch 'feature/manage_config_from_ui' into refactor/backend 2024-01-13 02:17:19 +01:00
Georges-Antoine Assi
75f94067cc Add basic tests around endpoints and models 2024-01-10 10:00:10 -05:00
Georges-Antoine Assi
f7df912e20 Finish scanning for saves/states 2023-11-13 13:02:54 -05:00
Georges-Antoine Assi
42976e170d Fix tests 2023-09-13 23:18:41 -04:00
Georges-Antoine Assi
08846d304f Mega cool refactor of dbhandler 2023-09-13 22:30:34 -04:00
Georges-Antoine Assi
0bae24da6a Refactor the backend 2023-09-12 23:42:26 -04:00
zurdi
f4f936f624 user avatar and enable/disable user support added 2023-08-23 14:16:31 +02:00
Georges-Antoine Assi
9601b0fa9e Add tests for oauth endpoint 2023-08-13 14:25:07 -04:00
Georges-Antoine Assi
0b5a09d53f Add test for rom endpoint 2023-08-13 14:10:27 -04:00
Georges-Antoine Assi
da4c318f6c Add tests for auth utils 2023-08-13 11:10:59 -04:00
Georges-Antoine Assi
58b7e9adcf Tweaks to db handelr test 2023-08-13 09:44:49 -04:00
Georges-Antoine Assi
3f97eca338 add user test for db handler 2023-08-13 00:01:36 -04:00
Georges-Antoine Assi
faba6d4e75 Self code cleanup 2023-08-12 00:38:29 -04:00
Georges-Antoine Assi
9ce95242a6 Fix get_roms method 2023-07-31 21:52:22 -04:00
Georges-Antoine Assi
71cd6b57e8 Alembic pre-test migrations + db handler tests 2023-07-31 20:06:57 -04:00