refactor: migrate session management to TRPC and remove legacy API endpoints

This commit is contained in:
Justin Lin committed 2025-04-23 16:37:12 +08:00
1 parent b4b8f8baee
commit 92173bb7e9
7 files changed
+71 -191

No files matched your search

-14
View File
@@ -9,17 +9,3 @@ const api = axios.create({
withCredentials: true,
})
export default api
export async function createSession(questId: string): Promise<Session> {
const res = await api.post<Session>('/sessions', { questId })
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
}