From 7d34f18156b6f60ee4aaa29d3b1c3286014ad6c6 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 18 Nov 2024 21:51:56 +0530 Subject: [PATCH 1/2] chore: remove console log --- src/api/storage.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api/storage.ts b/src/api/storage.ts index b4d24b9f..90ab91af 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -35,7 +35,6 @@ export const updateRecording = async (id: string, data: { name?: string; limit?: export const duplicateRecording = async (id: string, targetUrl: string): Promise => { try { - console.log("duplicating"); const response = await axios.post(`${apiUrl}/storage/recordings/${id}/duplicate`, { targetUrl, }); From cf5b2af62fea6dad8213a43e019d3524708aca4a Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 18 Nov 2024 22:11:55 +0530 Subject: [PATCH 2/2] fix(temp): expiry --- server/src/routes/auth.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index 88c27d27..96f4769a 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -44,9 +44,7 @@ router.post("/register", async (req, res) => { return res.status(500).send("Internal Server Error"); } - const token = jwt.sign({ id: user.id }, process.env.JWT_SECRET as string, { - expiresIn: "12h", - }); + const token = jwt.sign({ id: user.id }, process.env.JWT_SECRET as string); user.password = undefined as unknown as string; res.cookie("token", token, { httpOnly: true, @@ -78,9 +76,7 @@ router.post("/login", async (req, res) => { const match = await comparePassword(password, user.password); if (!match) return res.status(400).send("Invalid email or password"); - const token = jwt.sign({ id: user?.id }, process.env.JWT_SECRET as string, { - expiresIn: "12h", - }); + const token = jwt.sign({ id: user?.id }, process.env.JWT_SECRET as string); // return user and token to client, exclude hashed password if (user) { @@ -371,8 +367,7 @@ router.get( // Generate JWT token for session const jwtToken = jwt.sign( { userId: user.id }, - process.env.JWT_SECRET as string, - { expiresIn: "12h" } + process.env.JWT_SECRET as string ); res.cookie("token", jwtToken, { httpOnly: true });