@cavver/common
v0.0.4
Published
Npm ``` npm install @cavver/common ``` Yarn ``` yarn add @cavver/common ``` ## Services ### Encryptor - generateHash() - Method to generates encrypted string - password - Password to be encrypted - compare() - comparisson between a hash and password st
Downloads
11
Readme
Quero Doar Common
Installation
Npm
npm install @cavver/common
Yarn
yarn add @cavver/common
Services
Encryptor
- generateHash() - Method to generates encrypted string
- password - Password to be encrypted
- compare() - comparisson between a hash and password string
- password - Password string without encryption
- hash - Password string encrypted
Auth Service
- generateToken() - Generates a user Token
- TokenPayload - Needs only an id
- validateToken() - Validates when token is expired or invalid
- authorization - Authorization object from header
Decorators
@CustomPost()
Shortcut for swagger decorators and nest common post decorator
Schemas
DefaultOption
- Default options that each custom api decorator has
- summary - Non optional route brief description
- route - Optional route name
- response - Optional route response type
PostOption
- Post shortcut type
- body - Optional body type