fix logging messages

This commit is contained in:
Dobromir Popov
2024-04-28 02:13:24 +03:00
parent b6001a0042
commit ec33163dc5
2 changed files with 12 additions and 29 deletions

View File

@ -31,9 +31,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const targetTable = req.query.nextcrud[0];
//get target action
if (req.method === 'DELETE') {
const targetId = req.query.nextcrud[1];
logger.info('[nextCrud] ' + targetTable + ': ' + targetId + 'DELETED by ' + session.user.email);
switch (targetTable) {
case 'publishers':
const targetId = req.query.nextcrud[1];
logger.info('[nextCrud] ' + targetTable + ': ' + targetId + ' DELETED by ' + session.user.email);
break;
default:
break;
}
}
return nextCrudHandler(req, res);
}