Skip to content
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

adds judging auth endpoint; removes broken code from tartanhacks #144

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

pm3512
Copy link
Contributor

@pm3512 pm3512 commented Mar 12, 2024

Adds an endpoint to retrieve user status in the format required by judging

Removes broken code that was pushed to main

@pm3512 pm3512 requested a review from anudaweerasinghe March 12, 2024 21:48
@@ -10,6 +10,7 @@ export interface IUser extends Document {
email: string;
password: string;
admin: boolean;
judge: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Make optional for backwards compatibility

try {
const user = await User.findOne({ email });
if (!user) {
return notFound(res, "Unknown account");
Copy link
Member

Choose a reason for hiding this comment

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

return unauthorized

@pm3512 pm3512 requested a review from anudaweerasinghe March 12, 2024 22:16
@pm3512 pm3512 changed the title adds judging auth endpoint adds judging auth endpoint; removes broken code from tartanhacks Mar 12, 2024
@pm3512 pm3512 merged commit bb2a693 into main Mar 12, 2024
1 check passed
@pm3512 pm3512 deleted the judging branch March 12, 2024 22:18
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.

2 participants