default values for env and critic check for values
This commit is contained in:
parent
b3d1c2d729
commit
d889f92643
8 changed files with 92 additions and 27 deletions
|
@ -1,5 +1,6 @@
|
|||
import { dataSource } from "../data-source";
|
||||
import { refresh } from "../entity/refresh";
|
||||
import { REFRESH_EXPIRATION } from "../env.defaults";
|
||||
import InternalException from "../exceptions/internalException";
|
||||
import { JWTHelper } from "../helpers/jwtHelper";
|
||||
import { StringHelper } from "../helpers/stringHelper";
|
||||
|
@ -28,7 +29,7 @@ export default abstract class RefreshCommandHandler {
|
|||
.values({
|
||||
token: refreshToken,
|
||||
user: await UserService.getById(createRefresh.userId),
|
||||
expiry: new Date(Date.now() + ms(process.env.REFRESH_EXPIRATION)),
|
||||
expiry: new Date(Date.now() + ms(REFRESH_EXPIRATION)),
|
||||
})
|
||||
.execute()
|
||||
.then((result) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue