fix: add missing errors utility and fix seed timestamp casting
- Add apps/api/src/utils/errors.ts with AppError class - Fix seed.ts timestamp casting for calendario_fiscal Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -216,7 +216,7 @@ async function main() {
|
|||||||
await prisma.$executeRawUnsafe(`
|
await prisma.$executeRawUnsafe(`
|
||||||
INSERT INTO "${schemaName}"."calendario_fiscal"
|
INSERT INTO "${schemaName}"."calendario_fiscal"
|
||||||
(titulo, descripcion, tipo, fecha_limite, recurrencia, completado)
|
(titulo, descripcion, tipo, fecha_limite, recurrencia, completado)
|
||||||
VALUES ($1, $2, $3, $4, 'mensual', $5)
|
VALUES ($1, $2, $3, $4::timestamp, 'mensual', $5)
|
||||||
ON CONFLICT DO NOTHING
|
ON CONFLICT DO NOTHING
|
||||||
`, evento.titulo, `${evento.titulo} - ${mes}/${año}`, evento.tipo, fechaLimite.toISOString(), completado);
|
`, evento.titulo, `${evento.titulo} - ${mes}/${año}`, evento.tipo, fechaLimite.toISOString(), completado);
|
||||||
}
|
}
|
||||||
|
|||||||
10
apps/api/src/utils/errors.ts
Normal file
10
apps/api/src/utils/errors.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export class AppError extends Error {
|
||||||
|
constructor(
|
||||||
|
public statusCode: number,
|
||||||
|
public message: string,
|
||||||
|
public isOperational = true
|
||||||
|
) {
|
||||||
|
super(message);
|
||||||
|
Object.setPrototypeOf(this, AppError.prototype);
|
||||||
|
}
|
||||||
|
}
|
||||||
5
apps/web/next-env.d.ts
vendored
Normal file
5
apps/web/next-env.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/// <reference types="next" />
|
||||||
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||||
4239
pnpm-lock.yaml
generated
4239
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user