Epicnessism / BadmintonDb2

Second implementation of Badminton DB
4 stars 0 forks source link

Lots of changes, features + fixes #72

Closed Epicnessism closed 1 year ago

Epicnessism commented 1 year ago

added upcoming games skeleton by tournament, fixed node types issue, updated to Angular 14 and fixed vulnerabilities

Epicnessism commented 1 year ago

before committing, should consider adding event name to the upcoming sets for better understanding of where the set is coming from

Epicnessism commented 1 year ago

Create an issue to implement refresh rate limiting

Epicnessism commented 1 year ago

Working on making buttons show up correctly based on isTournamentAdmin but running into issues with req.session not existing while localStorage does exist and no way to connect the two

Epicnessism commented 1 year ago

Okay, seems that really only happens if the server dies so the req.session dies with it. The local storage doesn't die. Maybe investigate a periodically called or regularly checked endpoint to see if the session still exists and if not log the user out on the client-side?

Epicnessism commented 1 year ago

Okay well I'm not really sure anymore what I was doing, I think I was adding the games_played and eliminated fields and somehow I broke setUpdation sooooooooooooooooooooo I'll need to fix that. I will also need to investigate how to grab the event_team data so I can actually update/read from the games_played and eliminated fields. which will probably also mean I will need to create a new sql query to update that table, which probably also means I should prooooooooooobably consider moving this whole set updation workflow into a transaction, but thats probably work for another day

Epicnessism commented 1 year ago

okay very weird, reloaded the local db and restarted and everything magically fixed itself, great

Epicnessism commented 1 year ago

now back to implementing games_played logic and eliminated logic.... Probably should be calculated on the server side instead of client-side?

Epicnessism commented 1 year ago

working on consolidating loser bracket logic with elimination logic together

Epicnessism commented 1 year ago

error: select * from "sets" where "bracket_id" = $1 and "event_game_number" = $2 - invalid input syntax for type uuid: "{"id":7,"bracket_id":"cccc13bb-0a6b-4991-88d9-594aedaf5e6c","event_id":"11094d2c-108e-4a58-945c-9f260d5d7cf0","bracket_size":8,"bracket_level":"C"}"

Epicnessism commented 1 year ago

Now that set-updation has been "updated?" I dont even know what I ended up changing or updating except moving to a Transaction based model for half of the transaction, and its pretty fucking janky. But it works i guess. Need to reacquire bearings on whether or not logic for current bracket/elimination has been integrated or if that still needs to be done....

Epicnessism commented 1 year ago

TRX commit not allowed??? already completed???

Epicnessism commented 1 year ago

Trx already completed error by removing async in top-level transactions() function callback. Update Set now works again however games_played and eliminated fields are still not populating. Also noticed that seeding is still unset so I may need to recall if seeding is now handled at the server-backend level and not in the db itself....I think so since there was a discussion about how each change would cause multiple re-writes....