mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-05 03:18:45 +00:00
Redirect to user page rather than returning blank 400
This commit is contained in:
parent
7dc185d901
commit
d078afd99a
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ public class UserSettingsPage : BaseLayout
|
||||||
if (avatarHash != null)
|
if (avatarHash != null)
|
||||||
{
|
{
|
||||||
// Deny request if in read-only mode
|
// Deny request if in read-only mode
|
||||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.Redirect($"~/user/{userId}");
|
||||||
|
|
||||||
this.ProfileUser.IconHash = avatarHash;
|
this.ProfileUser.IconHash = avatarHash;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class UserSettingsPage : BaseLayout
|
||||||
if (biography != null)
|
if (biography != null)
|
||||||
{
|
{
|
||||||
// Deny request if in read-only mode
|
// Deny request if in read-only mode
|
||||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.Redirect($"~/user/{userId}");
|
||||||
|
|
||||||
biography = CensorHelper.FilterMessage(biography);
|
biography = CensorHelper.FilterMessage(biography);
|
||||||
if (this.ProfileUser.Biography != biography && biography.Length <= 512)
|
if (this.ProfileUser.Biography != biography && biography.Length <= 512)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue