Skip to content

Conversation

PedroBuffon
Copy link
Contributor

@PedroBuffon PedroBuffon commented Sep 4, 2025

When no user is detected an admin account is created, after that the user can create multiple users, set them as admin if wanted, plex, notification, mal connections are per user now.

closes #46

Copy link
Owner

@varoOP varoOP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Database

To migrate the databse, update the schema properly. The schema should always have the final current database schema so that on first install there's no need to go through migrations. Additionally, write all the migration SQL queries in a single string inside that slice of migrations. The number of string values in the migrations slice of strings represent the database version.

UserID addition to required domains

Instead of passing userID explicitly, we can do it implicitly. I think it's really smart to get the UserID from the context in the HTTP layer like you are doing now. Just inject the UserID into the structure in the HTTP layer and then it'll be available for use on the service and repo layer.

Mapping

The custom mapping portion of the application also needs the user context

AnimeUpdate

I see you have typed RecentAnimeItem more strongly, I like that. However, define your structure in the domain package to follow the convention instead of defining it in the HTTP layer.

Plex

For Plex, you are again looking for the userID in the service layer. Instead of that, follow the same flow of injecting userID in the HTTP layer and then using it later from the Plex structure. It will simplify things.

Awesome PR, let me know what you think about the proposed changes !

@varoOP varoOP changed the title Support for multiple users feat: support multiple users Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Multiple Plex Accounts

2 participants