add:product price

This commit is contained in:
ilham
2021-12-06 23:15:26 +07:00
parent f1594ebd96
commit 77db83490f
8 changed files with 80 additions and 36 deletions

View File

@@ -13,17 +13,9 @@ import { AuthController } from './auth.controller';
property: 'user',
session: false,
}),
JwtModule.register({
secret: process.env.SECRETKEY, signOptions: {
expiresIn: process.env.EXPIRESIN,
},
}),
],
controllers: [AuthController],
providers: [AuthService, JwtStrategy],
exports: [
PassportModule,
JwtModule
],
exports: [PassportModule, JwtModule],
})
export class AuthModule {}

View File

@@ -10,19 +10,19 @@ export class LocalStrategy extends PassportStrategy(Strategy) {
super();
}
async validate(
username: string,
password: string,
): Promise<Omit<User, 'password'>> {
const user = await this.authService.validateUser({
username,
password,
});
if (!user) {
throw new UnauthorizedException();
}
return user;
}
// async validate(
// username: string,
// password: string,
// ): Promise<Omit<User, 'password'>> {
// const user = await this.authService.validateUser({
// username,
// password,
// });
//
// if (!user) {
// throw new UnauthorizedException();
// }
//
// return user;
// }
}