Skip to content

Commit

Permalink
On PSP, return 200 OK when a user tries to do an invalid favourite ac…
Browse files Browse the repository at this point in the history
…tion

If we return Unauthorized, the client spams the server until it gets a 200 OK, which it never will, leading to an infinite loading loop.
  • Loading branch information
Beyley committed Sep 18, 2023
1 parent b0d21f6 commit a509253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Refresh.GameServer/Endpoints/Game/RelationEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Response FavouriteUser(RequestContext context, GameDatabaseContext databa
if (database.FavouriteUser(userToFavourite, user))
return OK;

return Unauthorized;
return context.IsPSP() ? OK : Unauthorized;
}

[GameEndpoint("unfavourite/user/{username}", Method.Post)]
Expand Down

0 comments on commit a509253

Please sign in to comment.