0.0.2 • Published 2 years ago
densyy-response v0.0.2
Densyy - Response
- Instalação
pnpm add densyy-response
- Utilização
/* ---- Requires ---- */
const helperResponse = require('densyy-response')
/* ---- Methods ---- */
exports.receberTodos = async (_req, res) => {
try {
const usuarios = await REPOSITORY_USUARIOS.receberTodos()
helperResponse.success(res, usuarios)
} catch (error) {
helperResponse.serverError(res)
throw new Error(error)
}
}