-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: user logging #13
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
❌ Code formatting check failed. Please run |
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Was a bit concerned about initialiseAdmins
move, but I think it's fine in this case.
import { initialiseAdmins } from './initialise'; | ||
|
||
console.log('Initializing admins...'); | ||
initialiseAdmins(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure you want this here? previously, it was called by /init
or src\infra\lambda.ts
With it running automatically like this you could have multiple instances running the function simultaneously. Typically I would add a lock to prevent this, but in this case the risk is minimal and we're not running multiple instances anyway. Redundant updates are fine and duplicate user inserts won't happen due to email unique constraint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, but could consider doing this management with database migrations.
This adds basic user logging for logins, change passwords and change roles.
This route includes pagination.
Also bumps prisma to new major version v6 - no breaking changes for us.