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

Add ranking freeze feature #21

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Add ranking freeze feature #21

merged 3 commits into from
Apr 19, 2024

Conversation

JakubZojdzik
Copy link
Owner

No description provided.

@maciejopalinski maciejopalinski self-requested a review April 19, 2024 20:23
@@ -173,25 +177,53 @@ const solves = async (request, response) => {
};

const ranking = async (request, response) => {
const dbRes = await pool.query(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean, you could just disable the submissions after some timestamp instead of filtering the ranking.
Also, I think that the freeze == 'true' check does nothing, the entire if statement is redundant and not required.
You could just remove it and always filter by the timestamp. The result would be functionally the same.

Copy link
Owner Author

Choose a reason for hiding this comment

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

if statement is redundant, because freeze ha wrong value by mistake

@@ -12,6 +12,6 @@ COPY ./competition.yaml /etc/sok/

ENV SOK_CONFIG=/etc/sok/competition.yaml

EXPOSE 8080
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remind me to change the reverse proxy config right before merging this.

@maciejopalinski maciejopalinski merged commit 68b68e9 into master Apr 19, 2024
1 check passed
@maciejopalinski maciejopalinski deleted the develop branch April 19, 2024 21:36
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