Skip to content

ProstoEVREY/testERP.AERO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

REST API made as a testing task for ERP.AERO

API

/signup [POST] -> {id,password} returns TokenPair

/signin [POST] -> {id,password} returns TokenPair

/logout [GET] -> {}, headers.authorization

/signin/new_token [POST] -> {}, headers.authorization (Refresh)

/info [GET] -> {}, headers.authorization (Bearer), returns User

/latency [GET] -> {}, headers.authorization (Bearer), returns Server responce latency

/file/list?page_size=X&page=Y [GET] -> {},headers.authorization (Bearer) returns File list paginated by list_size (default 10) and page (default 1)

/file/:id [GET] -> {},headers.authorization (Bearer) returns File info by id

/file/download/:id [GET] -> {}, headers.authorization (Bearer) returns Downloaded file

/file/upload [POST] -> {file}, headers.authorization (Bearer) creates new File

/file/update/:id [PUT] -> {file}, headers.authorization (Bearer) updated File by id

System

The Express.js normal framework layout is used.

Routes as Controllers address the Services

Prisma is used as MySQL ORM

All sensitive information is stored in .env

Launch

$ npm install

$ npm run start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published