NathanaelAma / LoRDeckTrackerServer

Documentation comments not found for functions and classes JS-D1001
Documentation
Minor
2 months ago3 months old
Documentation comment not found for class UsersController
  3import { User } from '@interfaces/users.interface';
  4import userService from '@services/users.service';
  5
  6class UsersController {  7  public userService = new userService();
  8
  9  /**
Documentation comment not found for method definition createCookie
55    return { expiresIn, token: sign(dataStoredInToken, secretKey, { expiresIn }) };
56  }
57
58  public createCookie(tokenData: TokenData): string {59    return `Authorization=${tokenData.token}; HttpOnly; Max-Age=${tokenData.expiresIn};`;
60  }
61}
Documentation comment not found for method definition createToken
47    return findUser;
48  }
49
50  public createToken(user: User): TokenData {51    const dataStoredInToken: DataStoredInToken = { _id: user._id };
52    const secretKey: string = SECRET_KEY;
53    const expiresIn: number = 60 * 60;
Documentation comment not found for method definition logout
38    return { cookie, findUser };
39  }
40
41  public async logout(userData: User): Promise<User> {42    if (isEmpty(userData)) throw new HttpException(400, 'userData is empty');
43
44    const findUser: User = await this.users.findOne({ email: userData.email, password: userData.password });
Documentation comment not found for method definition login
23    return createUserData;
24  }
25
26  public async login(userData: UserDto): Promise<{ cookie: string; findUser: User }> {27    if (isEmpty(userData)) throw new HttpException(400, 'userData is empty');
28
29    const findUser: User = await this.users.findOne({ email: userData.email });