|
|
|
@ -26,6 +26,27 @@ module Mobile
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
desc "modify user"
|
|
|
|
|
params do
|
|
|
|
|
#optional :file, type: File, desc: 'avatar'
|
|
|
|
|
optional :occupation, type: String
|
|
|
|
|
optional :brief_introduction, type: String
|
|
|
|
|
optional :province, type: String
|
|
|
|
|
optional :city, type: String
|
|
|
|
|
optional :gender, type: Integer
|
|
|
|
|
end
|
|
|
|
|
put ':id' do
|
|
|
|
|
authenticate!
|
|
|
|
|
us = UsersService.new
|
|
|
|
|
begin
|
|
|
|
|
ue = us.edit_user params
|
|
|
|
|
{status: 0, data: ue}
|
|
|
|
|
rescue => e
|
|
|
|
|
{status: 1, message: e.message}
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|