AshlenPrice/capstone-api

Delete script not working

Opened this issue · 0 comments

Destroy script not working .. take a second look in the AM before filing issue on GA repo
Script attempt #1

$ EMAIL='1@1' PASSWORD='1'  PROFILE_ID=8 sh scripts/profiles/destroy.sh 
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
X-Request-Id: be9ddeff-57e1-4ee4-9502-42d27f8946ea
X-Runtime: 0.104588
Vary: Origin
Content-Length: 3772

{"status":404,"error":"Not Found","exception":"#\u003cActionController::RoutingError: No route matches [DELETE] \"/profiles\"\u003e"

Server

ActionController::RoutingError (No route matches [DELETE] "/profiles"):

Script attempt #2

$ EMAIL='1@1' PASSWORD='1'  ID=8 sh scripts/profiles/destroy.sh 
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
X-Request-Id: 0a842fee-9815-45ed-892e-19ace4bbc2a1
X-Runtime: 0.086010
Vary: Origin
Content-Length: 11488

{"status":500,"error":"Internal Server Error","exception":"#\u003cNoMethodError: undefined method `destroy' for nil:NilClass\u003e"

Server

NoMethodError (undefined method `destroy' for nil:NilClass):
  
app/controllers/profiles_controller.rb:39:in `destroy'