feat: load session and display start button if not exists

This commit is contained in:
wancat committed 2024-06-27 11:55:34 +08:00
1 parent c64043316e
commit 3398d18055
7 files changed
+51 -56

No files matched your search

+9
View File
@@ -34,3 +34,12 @@ export async function getSessions(
const res = await api.get<Session[]>('/sessions', { params: request })
return res.data
}
export async function getActiveSession(
questId: string
): Promise<Session | null> {
const res = await api.get<Session | null>('/sessions/active', {
params: { questId },
})
return res.data
}