1.1.3 • Published 3 years ago
@pacyl2k19/ekshhot-common-helpers v1.1.3
EKSHOT COMMON HELPERS
Ths NPM package contains common logic shared among backend micriservices, thid includes:
- Token logic
- Api Response handler
- Middlewares and Guards
Usage
- Install then import the package
// Install yarn add @ekshot/ekshhot-common-helpers // Import import { apiResponse, tokenHelper, JaHttpStatusCode } from '@ekshhot/ekshhot-common-helpers'
- Then use them like
return new ApiResponse(
JaHttpStatusCode.BAD_REQUEST, // the response status
"A message",
true, // If the request succeed
{}, // The data to send to the client
errors.array() // if any error
).sendResponse(res);
1.1.3
3 years ago