PR comments and possible fix for test failures.
This commit is contained in:
parent
34d6a41042
commit
57fa9baef8
|
@ -18,9 +18,14 @@ export enum TTL {
|
|||
ONE_DAY = 86400,
|
||||
}
|
||||
|
||||
export const keys = GENERIC.keys
|
||||
export const get = GENERIC.get
|
||||
export const store = GENERIC.store
|
||||
export const destroy = GENERIC.delete
|
||||
export const withCache = GENERIC.withCache
|
||||
export const bustCache = GENERIC.bustCache
|
||||
function performExport(funcName: string) {
|
||||
// @ts-ignore
|
||||
return (...args: any) => GENERIC[funcName](...args)
|
||||
}
|
||||
|
||||
export const keys = performExport("keys")
|
||||
export const get = performExport("get")
|
||||
export const store = performExport("store")
|
||||
export const destroy = performExport("delete")
|
||||
export const withCache = performExport("withCache")
|
||||
export const bustCache = performExport("bustCache")
|
||||
|
|
|
@ -4,7 +4,7 @@ import env from "../environment"
|
|||
import { getTenantId } from "../context"
|
||||
import * as redis from "../redis/init"
|
||||
|
||||
const TTL_SECONDS = Duration.fromDays(7).to(DurationType.SECONDS)
|
||||
const TTL_SECONDS = Duration.fromDays(7).toSeconds()
|
||||
|
||||
interface Invite {
|
||||
email: string
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as redis from "../redis/init"
|
|||
import * as utils from "../utils"
|
||||
import { Duration, DurationType } from "../utils"
|
||||
|
||||
const TTL_SECONDS = Duration.fromHours(1).to(DurationType.SECONDS)
|
||||
const TTL_SECONDS = Duration.fromHours(1).toSeconds()
|
||||
|
||||
interface PasswordReset {
|
||||
userId: string
|
||||
|
|
|
@ -28,6 +28,9 @@ export class Duration {
|
|||
toMs: () => {
|
||||
return Duration.convert(from, DurationType.MILLISECONDS, duration)
|
||||
},
|
||||
toSeconds: () => {
|
||||
return Duration.convert(from, DurationType.SECONDS, duration)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue