-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add admin flag, refactor user-related code
- Introduce is_admin flag in member table and user-related functions - Update createOrReturnID to return is_admin status - Automatically set first user as admin - Refactor User struct to include IsAdmin field - Update GetUser function to handle new IsAdmin field - Modify UserMiddleware to set is_admin in context - Remove unused model structs (Favorite, MemberPref, Message, etc.) - Update CreateOrReturnID query to return both ID and is_admin status - Adjust tests to accommodate new is_admin functionality - Update mock functions and test cases for user-related operations - Replace os.Stderr with io.Discard in test logger for clean test output Change-Id: I6238f1e736e6924d32f95c0f41b48578f86104f6 Signed-off-by: Ian Meyer <[email protected]>
- Loading branch information
Showing
7 changed files
with
135 additions
and
118 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.