Skip to content

Instantly share code, notes, and snippets.

@faustoct1
Last active July 22, 2019 01:00
Show Gist options
  • Save faustoct1/c6f51da60c1543b555f7ed41e489642d to your computer and use it in GitHub Desktop.
Save faustoct1/c6f51da60c1543b555f7ed41e489642d to your computer and use it in GitHub Desktop.
filter before quest
App::Api.controllers do
before do
auth_user
end
get '/me'
{id:@user[:id],name:@user[:name],username:@user[:username]}.to_json
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment