fix logging messages
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user