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
Added Staff Shift endpoints #134
base: main
Are you sure you want to change the base?
Conversation
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.
LGTM for now. Just change dates for staff shifts (might need to do it manually in mongo for existing events too) and we can merge.
Eventually GET /staff/shift
should only return events for authenticated staff.
const payload: JwtPayload = res.locals.payload as JwtPayload; | ||
|
||
if (!hasStaffPerms(payload)) { | ||
if (!hasAdminPerms(payload)) { |
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.
Why change this? All staff should be able to see staff events
Hierarchy should be like this:
non-staff: no access
staff: access to their own shifts + all general staff events
admins: access to staff shifts
/staff/shift
returns dummy data at the moment, we are working on bugfixing a timeout request issue but wanted to push out an MVP.