Saving settings works ok
This commit is contained in:
@@ -26,7 +26,21 @@ class UserController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
@res = {}
|
||||
check = check_auth(params)
|
||||
|
||||
if check == true
|
||||
user = User.find_by_vkid(params[:mid])
|
||||
unless params[:username].nil? or params[:email].nil?
|
||||
user.name = params[:username]
|
||||
user.email = params[:email]
|
||||
user.save
|
||||
end
|
||||
@res[:username] = user.name
|
||||
@res[:email] = user.email
|
||||
end
|
||||
|
||||
render :json => @res
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user