Code cleanup

This commit is contained in:
pancakes 2024-11-28 13:34:55 +10:00 committed by Laura Hausmann
parent 63d700f01a
commit 0497b35ec3
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -99,7 +99,7 @@ public class ProfileController(UserService userSvc, DriveService driveSvc) : Con
var prevAvatarId = user.AvatarId;
var prevBannerId = user.BannerId;
if (!file.ContentType.StartsWith("image/"))
throw GracefulException.BadRequest("Avatar must be an image");
@ -156,7 +156,7 @@ public class ProfileController(UserService userSvc, DriveService driveSvc) : Con
var prevAvatarId = user.AvatarId;
var prevBannerId = user.BannerId;
if (!file.ContentType.StartsWith("image/"))
throw GracefulException.BadRequest("Banner must be an image");