-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorized endpoints #133
Authorized endpoints #133
Conversation
@@ -1,3 +1,3 @@ | |||
ruby: | |||
enabled: true | |||
config_file: config/.rubocop.yml | |||
config_file: .rubocop.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved rubocop to the top-level, so it gets auto-detected locally.
404 | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we added this kind of not found handling to the extracted gem. This is fine for now, will have to refactor when we pull this in: https://github.com/PRX/hal_api-rails/pull/1/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I added this to catch some activerecord-not-found errors in very specific places, for the show/update/destroy actions. Hopefully specific enough that other unrelated model.find()
errors won't trigger an incorrect 404.
@cavis I think that's it for my review - the |
Adds some more authorized endpoints.
GET /authorization
the current userGET /authorization/accounts
active and approved accounts of the userGET /authorization/accounts/:id
show account of the user by idGET /authorization/accounts/:id/stories
list ALL (including unpublished) stories of the accountPOST /authorization/accounts/:id/stories
create new story for the accountGET /authorization/stories/:id
show any story of any of the users accountsDELETE /authorization/stories/:id
destroy any story