Teg3z / Wheel-of-Luck

The wheel chooses the game for you and your friends on Discord tonight!
0 stars 0 forks source link

Feature/improve date for db #27

Closed Teg3z closed 2 months ago

Teg3z commented 2 months ago

To complete the list of @R4tmax's suggestions from our code review I have changed the date format from a string to a datetime object, that is more efficient in databases.

Its efficient format, but not pretty, so now the code converts the datetime object from db to a nice string date format.

I have also made a new "Logs" collection in MongoDB and moved all documents across all Logs* collections into it. The moved documents have the property game_time adjusted to a datetime object from string to keep consistency and also a new property called players, that being a list of players who played the game in the document, basically converted category (LogsDK -> new document with players: ['D', 'K'], D and K being discord names of the players).

The addition of "Logs" collection is the final step to get rid of the categories and only keeping the reaction spin way.

R4tmax commented 2 months ago

obrazek DB is happy, hence I am happy.