Skip to content

Commit

Permalink
Merge pull request #12 from isdi-coders-2023/feature/renderFix
Browse files Browse the repository at this point in the history
fix problems with render
  • Loading branch information
FranciscoHernandez92 authored May 8, 2024
2 parents ade5bbe + 7f091e1 commit 8258914
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/base.controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type Repo } from '../repositories/type.repo';
import { type NextFunction, type Request, type Response } from 'express';
import { type Payload } from '../services/auth.services/auth.services';

export class BaseController<T, C> {
constructor(protected readonly repo: Repo<T, C>) {}
Expand All @@ -23,7 +24,7 @@ export class BaseController<T, C> {
}

async create(req: Request, res: Response, next: NextFunction) {
const data = req.body as C;
const data = req.body as C & Payload;
try {
const result = await this.repo.create(data);
res.status(201);
Expand Down

0 comments on commit 8258914

Please sign in to comment.