Commit graph

113 commits

Author SHA1 Message Date
Bruce Berrios
f4a9147308
Setup PR check action (#2445) by Bruception 2022-02-08 21:27:14 +01:00
Miodec
b4288d9bd2 user tags not required when loading user 2022-02-03 23:18:30 +01:00
Miodec
0ef370ca80 added name to stack 2022-02-03 22:54:01 +01:00
Bruce Berrios
5beb1bf619
Update Configuration to handle arrays/ Add new db client (#2395)
* Update Configuration to handle arrays

* Add new db client

* Add comment
2022-02-02 19:26:43 +01:00
Miodec
5074cc733c typo 2022-02-01 21:33:48 +01:00
Miodec
169d6ebfb3 removed keys length check 2022-02-01 21:32:57 +01:00
Miodec
bccc4f24fc added a check to only update the database configuration once 2022-02-01 21:01:24 +01:00
Miodec
cbdd3ed1c6 updating database configuration if number of keys is not the same 2022-02-01 20:15:27 +01:00
Miodec
08103327dc fixed issue where base configuratoin would fail to insert into the database 2022-02-01 00:31:04 +01:00
Bruce Berrios
101c227599
Add Dynamic Server Configuration (#2385) by Bruception
* Add no frontend script

* Define context middleware

* Define base configuration schema

* Define configuration DAO

* Setup context middleware and live configuration fetch

* Remove patch configuration method

* Rename files for consistency

* Use plain object check

* Use plain object

* modified base configuration

* renamed config property

* brought back 2 properties

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-01-31 22:47:58 +01:00
Miodec
1692679951 typo 2022-01-31 15:36:22 +01:00
Miodec
db4174c29a moved logging to controller 2022-01-31 13:05:14 +01:00
Miodec
90660a6858 logging reports 2022-01-31 13:03:59 +01:00
Miodec
ed4f109c56 increased report limits 2022-01-31 13:01:50 +01:00
Bruce Berrios
974e50ec48
Add quote reporting feature (#2372) by Bruception
* Add initial quote reporting logic

* Remove report status

* Add initial frontend

* Add submit logic

* Add report quote button to rating popup

* Refactor quoteId argument

* Remove console log

* Add captcha to request validation schema

* Use captcha id for value and reset

* Update report data schema

* Hide report popup on complete

* quote search styling update

* updated report quote styling

* tofixed

* tofixed

* moved report button to the result screen
styling changes

* resetting captcha after hiding to avoid ugly animation

* select2 styling update

* lowercase

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-01-31 00:53:56 +01:00
Bruce Berrios
dafaad9158
Refactor cron jobs (#2357) by Bruception
* Refactor cron job configuration

* Refactor leaderboard update logic

* Update naming

* Refactor to use leaderboard dao

* Deduplicate top 10 query

* Fix oopsy

* Fix query order

* Undo method signature update

* Update new records detection logic

* Fix lint
2022-01-28 19:48:08 +01:00
Miodec
1ce7533aa5 added unlink discord command sending 2022-01-08 15:40:46 +01:00
Miodec
f269d0dfd8 clearing lb personal bests on clear pb 2022-01-08 15:31:40 +01:00
Miodec
7da9afb557 added a function to get last result 2021-12-30 16:05:32 +01:00
Cameron
e56d534f33
fix: endpoints share the same rate limit (#2136) by CameronCT
* fix: cleaned rate limiter

* chore: separated ratelimits per request

* fix: bug where leaderboards would crash
2021-11-30 00:49:05 +00:00
Jack
9671c8115d no longer checking if result was using input rewrite 2021-11-23 21:06:42 +00:00
Miodec
13c1b40e13 fixed project not running correctly if git could not be initialised 2021-10-11 23:45:17 +01:00
Jack
cf8d258400
Quote submission (#1984)
* added new-quotes get and add routes

* added new-quotes/approve route to api

* Added front-end for quote submission

* fix language typo, force lowercase language

* Check for duplicate quote

* added unknown language handling to quote-submit

* npm i

* npm i

* language dropdown instead of input field

* mouse down instead click

* styling changes

* moved quotemod check to the controller,
added refuse endpoint,
added ability to approve and edit

* limiting quotes

* added log to quote approve

* added approve quotes button

* typo

* using the correct function, lowered limit

* added quote approve popup

* getting quotes and showing them

* error checking

* error checking

* removed console log

* stylng changes,
added refresh list button

* added disabled class

* styling changes

* handling button clicks
showing langauge and timestamp

* check if user is a quote mod

* approve button handling

* handling quote edit

* showing short quotes in red

* post, not get

* not parsing quote id to int

* parsing to objectid

* updated styling

* fixed lint warnings

* fixed up new quotes dao

* showing loader

* calling function correctly

* typo fix

* fixed wrong path,
fix broken newid,
saving file when file exists,
searching for the quote correctly when attempting to delete

* showing message

* blocking buttons and inputs when waiting for response,
unlocking after response

* deleted workflow

Co-authored-by: lukew3 <lukew25073@gmail.com>
2021-10-10 22:46:35 +01:00
Jack
447ab9dfc4 allowing disk use for leaderboard aggregation 2021-10-05 15:08:54 +01:00
Jack
614f7fde03 marking all results coming from the input rewrite 2021-09-29 14:21:35 +01:00
Jack
0566c25b9f checking if lbpb has timestamp 2021-09-20 22:55:04 +01:00
Jack
60e97f0791 better error message 2021-09-17 22:22:09 +01:00
Jack
f38733da10 using estimated document count instead of a deprecated function 2021-09-17 22:07:44 +01:00
Jack
13976921be added top % display. closes #825 2021-09-17 20:59:45 +01:00
Jack
74f4f8fc9c added more username validation 2021-09-14 15:38:44 +01:00
Jack
e8d73a898d announcing lb updates 2021-09-14 14:54:03 +01:00
Jack
c063012e9e added lazy mode 2021-09-13 17:28:00 +01:00
Jack
e90a250f92 reverted change made for testing 2021-09-13 15:46:54 +01:00
Jack
7e682136f7 added protection against duplicate user docs 2021-09-13 15:40:00 +01:00
Jack
e24e95e59c creating index on the correct collection this time 2021-09-10 14:15:49 +01:00
Jack
d5e21757c6 indexing leaderboard 2021-09-10 14:11:38 +01:00
Jack
1239f6ecae removed sort 2021-09-10 00:27:31 +01:00
Jack
a740d9f63e changed event name for lb update 2021-09-10 00:00:56 +01:00
Jack
b3f2aa544c not checking leaderboards on test complete
updating test leaderboards every 5 minutes
2021-09-09 23:39:10 +01:00
Jack
3d4f985cc6 better time logging 2021-09-09 19:24:34 +01:00
Jack
0984d5777d sorting lb, added perf require 2021-09-09 19:09:17 +01:00
Jack
a966aa3431 added logging 2021-09-09 17:41:13 +01:00
Jack
803025f80c not including banned users 2021-09-07 20:14:25 +01:00
Jack
1c710d609e removed old lb code 2021-09-07 17:44:54 +01:00
Jack
e6f701c3cb added update lb memory function to user api 2021-09-07 16:36:06 +01:00
Jack
9140e1654b lbpersonalbests will now resist even when clearing personal bests - will only be overridden if a new higher wpm was found than the one stored 2021-09-07 15:04:16 +01:00
Jack
febee299ba fixed function that searches by objectid 2021-09-07 15:03:24 +01:00
Jack
b931730ae9 fixed typo 2021-09-07 15:03:11 +01:00
Jack
c41e26e051 changed default to 100 2021-09-07 00:56:29 +01:00
Jack
5b85f11a19 added skip and limit 2021-09-06 20:36:09 +01:00