Reformat all project files to use the prettier config file.
This commit is contained in:
@@ -4,47 +4,35 @@ const path = require("path");
|
||||
const logger = require("../utils/logger");
|
||||
|
||||
require("dotenv").config({
|
||||
path: path.resolve(
|
||||
process.cwd(),
|
||||
`.env.${process.env.NODE_ENV || "development"}`
|
||||
),
|
||||
path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`)
|
||||
});
|
||||
|
||||
exports.default = async (req, res) => {
|
||||
const {
|
||||
useremail,
|
||||
bodyshopid,
|
||||
operationName,
|
||||
variables,
|
||||
env,
|
||||
const { useremail, bodyshopid, operationName, variables, env, time, dbevent, user } = req.body;
|
||||
|
||||
try {
|
||||
await client.request(queries.INSERT_IOEVENT, {
|
||||
event: {
|
||||
operationname: operationName,
|
||||
time,
|
||||
dbevent,
|
||||
user,
|
||||
} = req.body;
|
||||
|
||||
try {
|
||||
await client.request(queries.INSERT_IOEVENT, {
|
||||
event: {
|
||||
operationname: operationName,
|
||||
time,
|
||||
dbevent,
|
||||
env,
|
||||
variables,
|
||||
bodyshopid,
|
||||
useremail,
|
||||
},
|
||||
});
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
logger.log("ioevent-error", "trace", user, null, {
|
||||
operationname: operationName,
|
||||
time,
|
||||
dbevent,
|
||||
env,
|
||||
variables,
|
||||
bodyshopid,
|
||||
useremail,
|
||||
});
|
||||
res.sendStatus(200);
|
||||
}
|
||||
env,
|
||||
variables,
|
||||
bodyshopid,
|
||||
useremail
|
||||
}
|
||||
});
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
logger.log("ioevent-error", "trace", user, null, {
|
||||
operationname: operationName,
|
||||
time,
|
||||
dbevent,
|
||||
env,
|
||||
variables,
|
||||
bodyshopid,
|
||||
useremail
|
||||
});
|
||||
res.sendStatus(200);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user