mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Fix prod api url
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
const PORT = 4000
|
||||
const HOST =
|
||||
__SERVER__ && !__DEV__ ? process.env.INTRANET_HOST || "fo.parisestludique.fr" : "localhost"
|
||||
const API_URL = __DEV__ || __LOCAL__ ? `http://localhost:${PORT}` : "https://fo.parisestludique.fr"
|
||||
|
||||
export default {
|
||||
PORT,
|
||||
HOST: "0.0.0.0",
|
||||
API_URL: `http://${HOST}:${PORT}`,
|
||||
API_URL,
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ async function getSecret() {
|
||||
|
||||
export async function getJwt(email: string): Promise<string> {
|
||||
const jwt = sign({ user: canonicalEmail(email), permissions: [] }, await getSecret(), {
|
||||
expiresIn: "7d",
|
||||
expiresIn: "365d",
|
||||
})
|
||||
return jwt
|
||||
}
|
||||
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
declare const __CLIENT__: boolean
|
||||
declare const __SERVER__: boolean
|
||||
declare const __DEV__: boolean
|
||||
declare const __LOCAL__: boolean
|
||||
|
||||
declare module "*.svg"
|
||||
declare module "*.gif"
|
||||
@@ -16,6 +17,7 @@ declare namespace NodeJS {
|
||||
__CLIENT__: boolean
|
||||
__SERVER__: boolean
|
||||
__DEV__: boolean
|
||||
__LOCAL__: boolean
|
||||
$RefreshReg$: () => void
|
||||
$RefreshSig$$: () => void
|
||||
}
|
||||
|
Reference in New Issue
Block a user