Skip to content

Commit

Permalink
Update user.ts
Browse files Browse the repository at this point in the history
Add generic type to BaseCtrl
  • Loading branch information
adwulfran authored Oct 9, 2024
1 parent edd2c79 commit c47e53d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/controllers/user.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { sign, Secret } from 'jsonwebtoken';
import { Request, Response } from 'express';

import User from '../models/user';
import User, { IUser } from '../models/user';
import BaseCtrl from './base';

const secret: Secret = process.env.SECRET_TOKEN as string;

class UserCtrl extends BaseCtrl {
class UserCtrl extends BaseCtrl<IUser> {
model = User;

login = async (req: Request, res: Response) => {
Expand Down

0 comments on commit c47e53d

Please sign in to comment.