Skip to content

Web API #19

@williamleven

Description

@williamleven

All endpoints return errors along with other response data specified below

error
{
    code: int
    error: string
    message: string
}
  • POST /api/auth/login
{
  chalmers: {
    cid: string
    password: string
  }
}

validate the credentials
encrypt them,
send them back as cookie

set cookie
{
  errors: [error]
}
  • POST /api/auth/logout
cookie
unset cookie
{
 errors: [error]
}
  • GET /api/booking/availible?from=2016-11-03T12:15&to=2016-11-03T12:30
cookie
{
  rooms: [{
    provider: string
    id: string
  },...]
  errors: [error]
}
  • GET /api/booking
cookie
{
  bookings: [{
    id: string
    from: string (2016-11-03T12:15)
    to: string (2016-11-03T12:30)
    room: {
      provider: string
      id: string
    }
  },...]
  errors: [error]
}
  • DELETE /api/booking/{id}
cookie
{
 errors: [error]
}
  • POST /api/booking
cookie
{
  from: string (2016-11-03T12:15)
  to: string (2016-11-03T12:30)
  text: string
  room: {
    provider: string
    id: string
  }
}
{
  id: string
  errors: [error]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwebThis issue has to do with the web version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions