Commit Graph

18 Commits

Author SHA1 Message Date
Georges-Antoine Assi
776d3c6547 fix user endpoint tests 2024-12-12 16:17:54 -05:00
Michael Manganiello
eba2971ffb fix: Simplify query that validates new username already exists
Instead of fetching all users and checking if the new username is present
in the list, we can directly query the database for the username.
2024-10-14 01:10:31 -03:00
Michael Manganiello
1df27079c4 fix: Avoid query during import time to set add_user endpoint scopes
The `add_user` endpoint was querying the database at import time, to
decide whether to enforce the `users.write` scope or not. This is
problematic because the database might not be ready at import time.

Also, the decided `scopes` was being maintained for the entire
application lifetime, which is not ideal, as users can be created
without having the `users.write` scope, until the application is
restarted.
2024-10-13 22:27:14 -03:00
Georges-Antoine Assi
a53c0911d7 fix endpoint tests 2024-08-05 11:35:08 -04:00
Michael Manganiello
b9da72832d Merge pull request #1011 from rommapp/misc/migrate-moby-handler-to-async
misc: Migrate MobyGamesHandler to async
2024-07-23 11:10:27 -03:00
Michael Manganiello
7c6dfa8e50 feat: Use ContextVar to share httpx AsyncClient instance between requests 2024-07-23 01:29:32 -03:00
Georges-Antoine Assi
52a96058c4 Merge branch 'master' into patch-1 2024-07-22 16:57:24 -04:00
Michael Manganiello
6eb8e6aeff misc: Add Redis async cache
Introduce an asynchronous Redis instance to be used in async functions.
Also, this change migrates most of the sync cache usage to the new async
cache.
2024-07-21 18:23:19 -03:00
Michael Manganiello
1ce20cdcfc fix: Use namespaced cookie for session
Avoid conflicting cookie names when RomM runs in the same host as other
applications, by adding a `romm_` namespace to the session cookie.
2024-07-20 21:06:28 -03:00
Georges-Antoine Assi
176c57c792 run trunk fmt 2024-06-23 18:17:19 -03:00
Michael Manganiello
33ac3ca56d misc: Apply changes generated by pyupgrade
Changes automatically made by
[`pyupgrade`](https://github.com/asottile/pyupgrade), using the
`--py311-plus` flag, to be compatible with Python 3.11.
2024-06-23 18:17:08 -03:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04: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
42065aec7c backend refactor as RESTful 2024-01-15 13:34:18 +01:00
zurdi
66bdf6a86a fixed tests 2023-09-04 14:04:04 +02:00
Georges-Antoine Assi
a1d58bcff9 Update tests 2023-08-18 21:26:11 -04:00
Georges-Antoine Assi
c5da971a70 Add tests for identity endpoints 2023-08-13 13:34:53 -04:00