From 4e6602d82faabc7eb10a2038754dbc0a42318aa1 Mon Sep 17 00:00:00 2001 From: Annie Huang Date: Tue, 25 Jun 2024 19:01:26 +0800 Subject: [PATCH] change post to get (not yet success) --- app/src/store/session.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/store/session.ts b/app/src/store/session.ts index 6171350..8bee28d 100644 --- a/app/src/store/session.ts +++ b/app/src/store/session.ts @@ -83,7 +83,10 @@ export async function createSession() { export async function getActiveSession(questId: string) { try { - const res = await api.post('/sessions/active', { questId }) + // const res = await api.post('/sessions/active', { questId }) + const res = await api.get(`/sessions/${questId}`, { + params: { status: 'active' }, + }) await setSession(res.data) } catch (err) { console.error(err)