Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 1.9 KB

README.md

File metadata and controls

71 lines (46 loc) · 1.9 KB

API

PING

/api/ping
GET: check connection

ACCOUNT

/api/account/create
POST: create account

/api/account/verify?token=xxx
POST: verify the account of token's owner (token= aes enc of email)

/api/account/forgot_password
POST: send reset_password mail

/api/account/reset_password?token=xxx
POST: reset the password of token's owner (token= random hex string)

USER

/api/user/:username
GET get username data
PATCH change username data (if access token == username)

/api/user/:username/find
POST get suggested profiles for :username or research

/api/user/:username/visit
POST add username a visit (from access token owner)

/api/user/:username/like
POST add username a like (from access token owner)
DELETE remove the like to username (from access token owner)

/api/user/:username/rating
POST add/update username rating (from access token owner)

/api/user/:username/report
POST add username a report (from access token owner)

/api/user/:username/block
POST add username a block (from access token owner)
DELETE remove a block from username (from access token owner)

/api/user/:username/tag
POST add a tag to username
DELETE remove a tag from username

LOGIN && REFRESH && LOGOUT

/api/login
POST: login

/api/refresh
GET: refresh JWT

/api/logout
POST: Remove Access and Refresh tokens and set is_online to false

IMAGES

/api/images/:username/{1..5}.png
GET get username pictures

/api/images?number={1..5}
POST upload an image png/jpg and save it locally (server)