Fix icon updating for default game assets (#338)

This commit is contained in:
Josh 2022-07-01 03:00:14 -05:00 committed by GitHub
parent 8ff956fcbf
commit 36cd42399d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,12 +104,9 @@ public class UserController : ControllerBase
user.Biography = update.Biography;
}
foreach (string? resource in new[]
{
update.IconHash, update.YayHash, update.MehHash, update.BooHash, update.PlanetHash,
})
foreach (string? resource in new[]{update.IconHash, update.YayHash, update.MehHash, update.BooHash, update.PlanetHash,})
{
if (resource != null && !FileHelper.ResourceExists(resource)) return this.BadRequest();
if (resource != null && !resource.StartsWith('g') && !FileHelper.ResourceExists(resource)) return this.BadRequest();
}
if (update.IconHash != null) user.IconHash = update.IconHash;