Skip to content

Commit fc25ef0

Browse files
committed
Usernames for the signup api
1 parent 17d527a commit fc25ef0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/api/v8/users_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def create
8989
message: 'User created.'
9090
}
9191
else
92+
errors = @user.errors
93+
errors[:username] = errors.delete(:login) if errors.has_key?(:login)
9294
render json: {
9395
success: false,
9496
errors: @user.errors

0 commit comments

Comments
 (0)