mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-28 03:32:27 +00:00
parent
48f01f15a1
commit
34d0ec0337
1 changed files with 7 additions and 1 deletions
|
@ -104,9 +104,15 @@ public class UserController : ControllerBase
|
|||
user.Biography = update.Biography;
|
||||
}
|
||||
|
||||
// ReSharper disable once LoopCanBeConvertedToQuery
|
||||
foreach (string? resource in new[]{update.IconHash, update.YayHash, update.MehHash, update.BooHash, update.PlanetHash,})
|
||||
{
|
||||
if (resource != null && !resource.StartsWith('g') && !FileHelper.ResourceExists(resource)) return this.BadRequest();
|
||||
if (resource == "0") continue;
|
||||
|
||||
if (resource != null && !resource.StartsWith('g') && !FileHelper.ResourceExists(resource))
|
||||
{
|
||||
return this.BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
if (update.IconHash != null) user.IconHash = update.IconHash;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue