Refresh
Refresh copied to clipboard
Comment/Review moderation
- [x] Purge all reviews by user (https://github.com/LittleBigRefresh/Refresh/pull/683)
- [ ] Purge individual reviews by user
- [ ] Purge all comments by user
- [ ] Purge individual comments by user
does locking comments on levels or profiles count into this? it is a function LBP lets you use
proposed endpoints
reviews
- [x] DELETE
/admin/users/name/{username}/reviews - [x] DELETE
/admin/users/name/{uuid}/reviews - [x] DELETE
/admin/reviews/id/{reviewId}
comments
- [x] DELETE
/admin/users/name/{username}/comments/profile - [x] DELETE
/admin/users/name/{username}/comments/level - [x] DELETE
/admin/users/uuid/{uuid}/comments/profile - [x] DELETE
/admin/users/uuid/{uuid}/comments/level - [x] DELETE
/admin/comments/profile/id/{commentId} - [x] DELETE
/admin/comments/level/id/{commentId}
although on another note i don't understand why we have different endpoints for username and uuid both eventually get the GameUser object and do the same operation.
i propose changing it to /admin/users/{identifier} where it could be a uuid or username and then checked like so:
GameUser? user = ObjectId.TryParse(identifier, out _)
? database.GetUserByUuid(identifier)
: database.GetUserByUsername(identifier);
if (user == null) return ApiNotFoundError.UserMissingError;
or idk a middleware