0.0.2 • Published 2 years ago

densyy-response v0.0.2

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

Densyy - Response

  1. Instalação
pnpm add densyy-response
  1. 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)
  }
}
0.0.2

2 years ago

0.0.1

2 years ago