Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Robotitusx committed Sep 3, 2024
2 parents ddd66e0 + 3b51aab commit 1d865b9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion backend/src/database/database.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE IF NOT EXISTS incidencia (
incidencia_id INTEGER PRIMARY KEY,
incidencia_id INTEGER PRIMARY KEY AUTOINCREMENT,
nombre TEXT,
dni TEXT,
email TEXT,
Expand Down
Binary file modified backend/src/database/mydatabase.sqlite
Binary file not shown.
2 changes: 0 additions & 2 deletions backend/src/models/incidencias.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface IncidenciaCreateDTO {
}

export interface Incidencia extends IncidenciaCreateDTO {
id: number;
nombre: string;
dni: string;
email: string;
Expand Down Expand Up @@ -52,7 +51,6 @@ export interface Incidencia extends IncidenciaCreateDTO {
export const createIncidencia = (incidencia: IncidenciaCreateDTO): Incidencia => {
const incidenciaCreated: Incidencia = {
...incidencia,
id: incidencia.id,
fechaDeCreacion: incidencia.fechaDeCreacion,
estado: Estado.EN_REVISION,
image_url: incidencia.image_url
Expand Down
5 changes: 0 additions & 5 deletions backend/src/utils/validations/incidencias.validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { Estado, Tema, NivelDeRiesgo } from '../../models/estados.models';

// Get data from request body
const {
id,
nombre,
email,
tema,
Expand All @@ -69,10 +68,6 @@ import { Estado, Tema, NivelDeRiesgo } from '../../models/estados.models';
const errors = [];

// Valincidencia_idate data
if (!id) {
errors.push('incidencia_id is required');
}

if (!nombre) {
errors.push('nombre is required');
}
Expand Down

0 comments on commit 1d865b9

Please sign in to comment.