Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web API #19

Open
6 tasks done
williamleven opened this issue Aug 1, 2019 · 0 comments
Open
6 tasks done

Web API #19

williamleven opened this issue Aug 1, 2019 · 0 comments
Labels
enhancement New feature or request web This issue has to do with the web version

Comments

@williamleven
Copy link
Member

williamleven commented Aug 1, 2019

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]
}
@HerrNaN HerrNaN added the enhancement New feature or request label Aug 22, 2020
@HerrNaN HerrNaN added the web This issue has to do with the web version label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request web This issue has to do with the web version
Projects
None yet
Development

No branches or pull requests

2 participants