docbrown/app/controllers/concerns/api
Duke Greene dd7e34ac53
define api v1 routes for organizations (#19681)
* define api routes and create controllers, sketch out index and create actions

* add api v1 organizations CRUD spec and docs spec, need to run swagger

* swagger dry run on admin organizations routes, typo fix in api.rb

* flesh out specs and sketch out admin actions

* move actions out of concerns/include pattern and into v1 inline

* remove private constant call

* add v1 accept header to doc spec, fix syntax in a before block

* update controllers to address failing specs

* simplify controller and clarify route config

* flesh out tests for errors

* fix long line

* add missing commas

* return username show route to v0 concern controller

* create separate show route and action name, remove nesting from create/update params requirement

* clean up syntax in controller params and update show path in specs; move routes

* fix up syntax in params permit

* create organization in index spec

* one more syntax tweak for org params

* refactoring to one show route that handles username or id

* tweak spec syntax to expect the right array

* tweak controller and specs, simplify routing to show

* remove create route, action, and specs from this branch

* add clarifying comment in show controller action

* add explicit not found return to show route

* fix controller formatting causing 404 errors

* remove comment, update specs

* remove commment and fix id show response and specs

* fix show route and request spec for username param

* update unauthorized user specs to use put for now instead of post, regenerate swagger docs

* adjust update 422 spec to break org validity

* fix admin update spec, rerun swagger

* reorganiza controller actions, update specs, ensure authorized update and delete

* improve spec, handle finding one org more gracefully, delete via worker

* copy routes into api namespace instead of moving them from general namespace

* update param in v0 show route to fit more general naming

* regenerate v1 swagger docs

* use profile image url getter in update controller response

* update swagger docs and remove unneeded comment from org' model

* configure organizations destroy action for super admins only (for now)
2023-07-19 09:51:05 -04:00
..
admin API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
analytics_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
articles_controller.rb Preparation of endpoint and files required for ChatGPT Plugin (#19394) 2023-04-27 16:51:24 -04:00
comments_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
feature_flags_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
followers_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
follows_controller.rb Follow-ups for suggested organizations follows during onboarding (#19619) 2023-06-29 11:49:01 +02:00
health_checks_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
instances_controller.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
listings_controller.rb Update per_page_max in API endpoints + docs bump (#18415) 2022-09-02 14:07:19 -06:00
organizations_controller.rb define api v1 routes for organizations (#19681) 2023-07-19 09:51:05 -04:00
podcast_episodes_controller.rb Update per_page_max in API endpoints + docs bump (#18415) 2022-09-02 14:07:19 -06:00
profile_images_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
readinglist_controller.rb API V1 transition (#17835) 2022-06-23 14:26:00 -06:00
tags_controller.rb Update per_page_max in API endpoints + docs bump (#18415) 2022-09-02 14:07:19 -06:00
users_controller.rb Create a note when a users' articles are being unpublished via API (#18545) 2022-10-10 16:25:56 +03:00
videos_controller.rb Update per_page_max in API endpoints + docs bump (#18415) 2022-09-02 14:07:19 -06:00