add user api

This commit is contained in:
Pete Matsyburka
2024-07-21 15:16:55 +03:00
parent fc0504f91e
commit b72c99dbce
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
# frozen_string_literal: true
module Api
class UsersController < ApiBaseController
authorize_resource :current_user
def show
render json: current_user.as_json(only: %i[id first_name last_name email])
end
end
end