casa icon indicating copy to clipboard operation
casa copied to clipboard

API

Open FireLemons opened this issue 3 years ago • 12 comments

Description We'd like to accomplish many things with mobile development like offline service workers and creating an iOS app but to do so we need our routes to work like an api.

  • For every controller action that changes the database, make sure it supports a json format.
  • Error check/sanitize parameters
  • return a status of 500 if an error was encountered
  • Write tests
  • Document the api please edit the api readme in doc/

Action list: Work In Progress List

  • All Casa Admin
    • [x] create
    • [x] update
    • [x] update_password
  • Casa Admin
    • [x] create
    • [x] update
    • [x] deactivate
    • [x] activate
  • Casa Case
    • [x] create
    • [x] update
    • [x] deactivate
    • [x] reactivate
  • Casa Org (app/controllers/all_casa_admins/casa_orgs_controller.rb)
    • [x] create
  • Casa Org (app/controllers/casa_orgs_controller.rb)
    • [x] update
  • Case Assignments
    • [ ] create
    • [ ] unassign

Please do not do this all in a single pull request

FireLemons avatar Sep 24 '21 19:09 FireLemons

I'm not sure about this idea, but I'd like to propose a solution. I'll start by POST /casa_cases route

mauricio-prl avatar Oct 02 '21 15:10 mauricio-prl

I'd like to know, why it is necessary, for example, can we use the respond_to with format helper, in those controllers?

And if you like, we even can add this gem: https://github.com/heartcombo/responders to make the respond_to blocks easier to handle

mauricio-prl avatar Oct 03 '21 14:10 mauricio-prl

can we use the respond_to with format helper

That's originally what I had planned. I was just trying to get a list of all the routes that made changes to the database. Maybe I should look at each controller for a list.

FireLemons avatar Oct 03 '21 15:10 FireLemons

can we use the respond_to with format helper

That's originally what I had planned. I was just trying to get a list of all the routes that made changes to the database. Maybe I should look at each controller for a list.

Nice, then we do not need that implementation and go with respond_to helper. I'll adjust the pr

mauricio-prl avatar Oct 04 '21 14:10 mauricio-prl

thanks I'll clean up the issue description too when I have a chance

FireLemons avatar Oct 04 '21 15:10 FireLemons

Hey guys, I'm working on Casa Cases endpoints 😃

mauricio-prl avatar Oct 29 '21 20:10 mauricio-prl

Hi, can I work on Casa Orgs endpoints ?

efgalvao avatar Nov 09 '21 20:11 efgalvao

I actually created an issue regarding this, but the /casa_orgs endpoint should be a singular resource. It might make sense to fix that while working on it. That's #2919

mdchaney avatar Nov 09 '21 20:11 mdchaney

Ok, first I will work on that one.

efgalvao avatar Nov 10 '21 13:11 efgalvao

Hey guys, I'm working with casa_admin endpoints :D

mauricio-prl avatar Nov 25 '21 19:11 mauricio-prl

Hey guys, I'm working on the remaining CasaOrg controller, and @thiantonello is working on the last one.

Let's finish this epic 🚀

mauricio-prl avatar Dec 30 '21 19:12 mauricio-prl

That's not the complete list. Don't know when I'll have time to update it

FireLemons avatar Dec 31 '21 15:12 FireLemons

I took care of the case assignments endpoints, I just need permission to create a branch on the repo.

stephenandersondev avatar Jan 21 '23 22:01 stephenandersondev