sinfo / deck2

Version 2 of eventdeck
https://sinfo.org
MIT License
6 stars 0 forks source link

GET /flightinfos #131

Open bsdinis opened 5 years ago

bsdinis commented 5 years ago

Path: /flightinfos

Method: GET

Auth: member

Query:

Response:

{[
  id: String,
  inbound: Date,
  outbound: Date,
  from: String,
  to: String,
  link: String,
  bought: Boolean,
  cost: Number, // € -> can serve as budget
  notes: String,
]}

Notes:

Should return all flightinfos by default.

Status codes:

Code Rule
400 Bad query
200 Always

Tests:

  1. No query

Should return all flightinfos.

  1. Inbound on query

Should return all flightinfos that are inbound after this date.

  1. Outbound on query

Should return all flightinfo that are outbound before this date.

  1. Bought query

Should return all bought flights.

  1. Not Bought query

Should return all not bought flights.

  1. Bad query

Bad inbound/bad ouboundt: status code 404 on bad date format. All the others: return empty array.

bsdinis commented 4 years ago

@Dpac99 is this closeable?