mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
FIX: remove unneeded keys from failed response
This commit is contained in:
@ -545,11 +545,8 @@ class UsersController < ApplicationController
|
|||||||
else
|
else
|
||||||
if @error || @user&.errors&.any?
|
if @error || @user&.errors&.any?
|
||||||
render json: {
|
render json: {
|
||||||
success: false,
|
|
||||||
message: @error,
|
message: @error,
|
||||||
errors: @user&.errors&.to_hash,
|
errors: @user&.errors&.to_hash
|
||||||
is_developer: UsernameCheckerService.is_developer?(@user&.email),
|
|
||||||
admin: @user&.admin?
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
render json: {
|
render json: {
|
||||||
|
Reference in New Issue
Block a user