Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

isra-fel/daole-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend for Daoleme

API

/user

  • POST - signup
    • input: {username, password, email}
    • output:
      • success: 201 Created (with cookie)
      • fail: 409 Conflict, 400 Bad Request
  • PUT - update user setting *
    • input: {password} or {email}
    • output:
      • success: 200 OK
      • fail: 400 Bad Request

/user/signin

  • POST - signin
    • input: {username, password}
    • output:
      • success: 200 OK (with cookie)
      • fail: 401 Unauthorized

/user/signout

  • GET - signout *
    • output: 200 OK

/delivery

  • GET - list deliveries *
    • output: [{}]

/delivery/${delivery-id}

  • PUT - create delivery *
    • input: {company, alias, isPinned, isReceived}
    • output:
      • success: 201 Created
      • fail: 409 Conflict, 400 Bad Request
  • PUT - edit delivery *#
    • input: {isPinned} or {isReceived} or {alias} (you can edit only one field at a time)
    • output:
      • success: 200 OK
      • fail: 400 Bad Request, 404 Not Found
  • DELETE - remove favourite *#
    • output:
      • success: 200 OK
      • fail: 404 Not Found

Starred (*) APIs need authentication, the others do not. If these APIs are called without credentials (session), the server will return a 401 Unauthorized.

APIs with a # simbol support batch operations. Simply put a semicolon ; between the objects that you want to perform the batch operation on. E.g.

DELETE /delivery/${delivery-id-0};${delivery-id-1};...

About

backend for daoleme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published