Refresh icon indicating copy to clipboard operation
Refresh copied to clipboard

Comment/Review moderation

Open jvyden opened this issue 1 year ago • 1 comments

  • [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

jvyden avatar Nov 03 '24 01:11 jvyden

does locking comments on levels or profiles count into this? it is a function LBP lets you use

Arcadius2006 avatar Nov 19 '24 15:11 Arcadius2006

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

Nya0 avatar Jun 30 '25 13:06 Nya0