mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-17 19:37:02 +00:00
updated scripts
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "prettier"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{ "argsIgnorePattern": "_" }
|
||||
],
|
||||
"no-console": "off",
|
||||
"no-param-reassign": "off",
|
||||
"prettier/prettier": "error",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"start": "nodemon dist/server.js",
|
||||
"dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts"
|
||||
},
|
||||
"author": "",
|
||||
|
||||
@@ -5,11 +5,11 @@ import cors from "cors";
|
||||
import AppError from "./errors/AppError";
|
||||
|
||||
import routes from "./routes";
|
||||
import "./database";
|
||||
|
||||
// import path from "path";
|
||||
// import multer from "multer";
|
||||
// import Sentry from "@sentry/node";
|
||||
import "./database";
|
||||
|
||||
// const { initWbot } = require("./libs/wbot");
|
||||
// const wbotMessageListener = require("./services/wbotMessageListener");
|
||||
@@ -22,7 +22,7 @@ app.use(cors());
|
||||
app.use(express.json());
|
||||
app.use(routes);
|
||||
|
||||
app.use(async (err: Error, req: Request, res: Response, next: NextFunction) => {
|
||||
app.use(async (err: Error, req: Request, res: Response, _: NextFunction) => {
|
||||
if (err instanceof AppError) {
|
||||
return res.status(err.statusCode).json({ error: err.message });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user