change post to get (not yet success)

This commit is contained in:
Annie Huang authored and wancat committed 2024-06-27 10:30:00 +08:00
1 parent 2eaf3c8f24
commit 4e6602d82f
1 file changed
+4 -1
+4 -1
View File
@@ -83,7 +83,10 @@ export async function createSession() {
export async function getActiveSession(questId: string) { export async function getActiveSession(questId: string) {
try { 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) await setSession(res.data)
} catch (err) { } catch (err) {
console.error(err) console.error(err)