auth

/api/v1/auth

user

/api/v1/auth/user

  • GET /

    get all user list.
    response uuid, name

    • header with token which is authority 2
  • GET /me

    get user information
    response uuid, name, join, last login

    • header with token
  • GET /:id

    get specific user list.
    response uuid, name, join, last login

    • header with token which is authority 2
  • POST /register

    user register
    response uuid,email,name

    • json body
    • email, name require
    • password at least 8 char
  • POST /login

    user login
    response msg, uuid, type, token

    • json body
    • email, password
  • DELETE /:id

    delete user
    response 'OK'

    • header with token which is authority 1
  • PATCH /password

    user change password

    response 'OK'

    • header with token
    • json body
    • password require, at least 8 char
  • PUT /

    user change information

    response 'OK'

    • header with token
    • json body
    • email, name require

staff

/api/v1/auth/staff

  • GET /

    get all staff list
    response uuid, emailhash, name

  • GET /me

    get staff information
    response uuid, name, email, skill, tags, description,
    join, mailhash

    • header with token
  • GET /:id

    get specific staff information
    response uuid, name, email, skill, tags, description,
    join, mailhash

  • POST /register

    transfer user to staff
    response 'OK'

    • header with token which is autority 1
    • json body
    • id required
  • POST /login

    staff login
    response msg, uuid, type, token

    • json body
    • email, password required
  • DELETE /:id

    delete staff
    response 'OK'

    • header with token which is authority 1
  • PATCH /password

    staff change password
    response 'OK'

    • header with token
    • json body
    • password required
  • PATCH /:id

    change staff authority
    response 'OK'

    • header with token which is authority 1
    • json body
    • authority required
  • PUT /

    staff edit information
    response 'OK'

    • header with token
    • json body
    • name, email, skill, description, tags required

Announcement

/api/v1/auth/announcement

  • GET /

    get announcement which is not expired
    response uuid, title, content, type,
    release time, update time, expire

  • GET /all

    get all announcement
    response uuid, title, content, type,
    release time, update time, expire

  • GET /:id

    get specific announcement
    response uuid, title, content, type,
    release time, update time, expire
    history list

  • POST /

    post announcement

    • header with token which is authority 2
    • json body
    • title, content, type, expire required
  • DELETE /:id

    delete announcement

    • header with token which is authority 2
  • PUT /:id

    edit announcement

    • header with token which is authority 2
    • json body
    • title, content, type, expire required
    • detail option