rogueserver icon indicating copy to clipboard operation
rogueserver copied to clipboard

Added back-end support for friends

Open GamrayW opened this issue 1 year ago • 0 comments

This has been discussed on discord with benny, this is the base work for friends. For now, we can add/remove friends and see them in the new daily friend ranking that will be implemented on front-end after this goes through.

In order to make this work, I added a new table 'friends' that links usernames to show friend relations.

There's 3 new endpoints, /account/addfriend, /account/removefriend, /account/friendsonline, and a new category for the rankings. (EDIT: adding friend and removing friend has been updated to POST /account/friends and DELETE /account/friends?username=<friend_username> after review)

Here's the tests I made:

adding/removing friends

image

checking friends online

image

comparing friend ranking and standard daily ranking

image

Ideally, this could be merged before #13 as there's no merge conflict right now, and we need to wait for the backend to be ready before changing stuff on the front-end to implement it, so the sooner the better.

GamrayW avatar May 18 '24 12:05 GamrayW