-
Notifications
You must be signed in to change notification settings - Fork 9
User profile feature
Vladislav Trotsenko edited this page Sep 30, 2019
·
2 revisions
This is basic user profile feature. It consists of 1 endpoints:
The point of this endpoint is show user profile details. Accepts account inclusion.
module Api::V1::Users::Account
class ProfilesController < AuthorizedApiController
def show
endpoint Api::V1::Users::Account::Profiles::Operation::Show
end
end
end
module Api::V1::Users::Account::Profiles::Operation
class Show < ApplicationOperation
step Macro::Assign(to: :model, path: %i[current_account user]) # ctx[:model] = ctx[:current_account].user
step Macro::Assign(to: :available_inclusion_options, value: %w[account]) # ctx[:available_inclusion_options] = ['account']
step Subprocess(Api::V1::Lib::Operation::Inclusion), fast_track: true
step Macro::Renderer(serializer: Api::V1::Users::Account::Profiles::Serializer::Show)
end
end
RubyGarage is a leading software development and consulting company in Eastern Europe. Our main expertise includes Ruby and Ruby on Rails, but we successfully employ other technologies to deliver the best results to our clients. Check out our portfolio for even more exciting works!