Skip to content

Station End Points Return Codes #10

@joannekoch

Description

@joannekoch
  1. api/stations/create - returns 204 - HTTP 204 No Content - instead of a Successful Response. Throws an error in code when expecting a response with await response.json(); Please return a Successful Response.

  2. api/stations/create - returns an error - SyntaxError: Unexpected token 'T', "Traceback "... is not valid JSON when try to create a station with the same name. Please return the correct error below:
    django.db.utils.IntegrityError: duplicate key value violates unique constraint "core_station_name_key"
    DETAIL: Key (name)=(test) already exists.
    Internal Server Error: /api/stations/create

  3. api/stations/create and api/stations/set_location do not update the Station File.

  4. api/stations/set_location throws either error: 204 error (no content) or SyntaxError: Unexpected token 'T', "Traceback "... is not valid JSON when try to set a station location with the same location & time. Please return Sucdcess or the correct error below:

    A location already exists at the given start_time

  5. Add delete station ep in case admin creates a station by accident.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions