Skip to content
Snippets Groups Projects
Auditor.ts 614 B
Newer Older
Renzo Beux's avatar
Renzo Beux committed
import Auditor from '../Models/Auditor';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const audit = (request: any, action: string): void => {
  const userId = request.user_id;
  Auditor.create({ user_id: userId, action });
};

Renzo Beux's avatar
Renzo Beux committed
// export const getAudit = (cant: number, page: number) => {
//   const init = (cant * page) - cant;
//   const end = cant * page;
//   Auditor.findAll({
//     where: {
//       ageRange: ageBracket as string,
//       sex: sex as string,
//     },
//     order: [['order', 'ASC']],
//   })
// };

Renzo Beux's avatar
Renzo Beux committed
// BD: UUID // USER ID // ACTION // TIME