Commit graph

10 commits

Author SHA1 Message Date
Bruce Berrios 5a0e8ae72e
Housekeeping (#3374) 2022-08-08 16:16:07 +02:00
Bruce Berrios af70bc5971
Bump coverage (#3314) 2022-07-06 21:01:58 +02:00
Miodec 8ec307c837 added authentication tests 2022-06-30 01:15:06 +02:00
Bruce Berrios 9da5e441be
Add new rate limiting flow (#3230) Bruception
* Add new rate limiting flow

* Oops

* Fix nit

* Fix some bugs

* Split key generation functions

* Remove 429

* Change message for root limiter

* Flag 429 and add config

* Add status code config

* Check enabled flag

* Add custom status for ape keys

* Bump coverage

* swapped conditions around
whats the point of checking if the status code is in the array if the whole thing is turned off anyway

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-06-28 13:45:57 +02:00
Bruce Berrios db9dcafc25
Add User Profiles (#3174)
* profile

* rounded table corners

* rounded leaderboards corners

* wider page by default

* v3

* font changes

* new pbtables

* blank by default

* showing pb popup

* removed some quotes

* rounding displayed acc

* removed created date (will be shown in profile)

* added profile module that fills the profile element

* updating font size in the middle of the swap to make the change not noticeable

* lowered max font size

* showing if user is banned,
not displaying most details if user is banned

* pbs not selectable

* renamed global stats to time typing

* completed previous commit

* changed function parameters

* only hiding when social is missing

* smaller badge

* aligning quick results
spanning time if wide

* larger badge

* fixed function parameters

* moved to root

* media queries

* Add user profile API (#3123) bruception

* Add flattenObjectDeep

* Add user profile API

* Bump coverage

* Add user profile configuration and rate limits

* Rename profile -> profileDetails

* Simplify

* Filter personal bests

* Handle banned users

* Add banned user test

* new profile layout system
"none" layout finished

* better "none" layout

* "socials" layout

* larger gap

* bioandkey layout done

* "both" layout finished

* final touches

* Add profile editing (#3135)

* Add profile editing

* lowered font size
increased right padding

* updated configuration schema

* moved discord integration to users object in configuration

* added warning comment

* rendering new lines

* edit popup styling

* Sanitize ZAlgo text

* Use trim

* Replace more than 2 spaces with two spaces

* Trim first

* Add profanity detection

* Ass

* Removed some profanities

* Update profanity detection

Co-authored-by: Miodec <bartnikjack@gmail.com>

* Add profile routing (#3143) bruception miodec

* Add profile routing

* removed check (also fixes circular deps)

* change page in special cases

* Hydrate profiles

* Link leaderboards to profiles

* Add failed to load div

* Dont refresh page

* always calling middle callback

* moved profile css into its own file

* fixed one media query

* added preloader, changed default layout

* added reset function
changed function name
updating profile before the page is shown, not after

* resetting after the page is hidden and before its updated

* Fix logic to not delete user if DB goes down (#3171)

* Dont route to account if uid equals current user uid

* temporairly allowing quicktab

* added copy link button

* only increasing padding on the account page

* set max height

* handling copy link button

* only showing avatar if it exists

* 1000 instead of 100

* removing placeholder if image request was successful

Co-authored-by: Miodec <bartnikjack@gmail.com>

* Fix quote length field

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-06-21 12:01:55 +02:00
Jack 46e0c5c960
Auto ban (#2984)
* added auto ban if user triggers anticheat too much

* updated base configuration

* autoban is optional

* storing updated autoban array

* only checking autoban in time 15 and 60

* miliseconds

* removed unnecessary if check

* returning if already banned

* storing now in variable
greater not greater equal

* moved constant outside function

* using partial type

* renamed variables

* renamed to autoBanTimestamps

* added autoban tests

* increased coverage minimum

* slightly better test

* added autoBanTimestamps checks to other tests
2022-05-16 21:03:44 +02:00
Bruce Berrios 6c666f12ba
Add user creation flow test (#2971) bruception 2022-05-13 09:05:57 +02:00
Bruce Berrios 0a371b531a
Add more tests (#2965) Bruception and sondrekje
* Cover updateName

* Test clearPb, export getUsersCollection for testing purposes

* Add base coverage

* Month -> thirty days

Co-authored-by: Sondre Kjempekjenn <sondre.kjempekjenn@gmail.com>
2022-05-11 14:08:06 +02:00
Bruce Berrios 8095dd6bfc
Add test step in pr-check action (#2942) Bruception
* Add test step in pr-check action

* Add jest action

* Specify wd

* Remove action

* Remove test

* Add anti-cheat check
2022-05-05 23:06:40 +02:00
Sondre Kjempekjenn 88a587c5c2
Feature/backend test (#2937) sondrekje
* Switch to ts-node-dev for development

* Minimal setup for backend testing

* Basic controller test

* __tests__ directory

* Delete old DB client

* Improve tests, ensure DB cleanup only runs for inMemory DB
2022-05-05 15:19:31 +02:00