mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
wip: get active session
This commit is contained in:
1 parent
423548804a
commit
963655c1f7
7 files changed
+69
-12
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import axios from 'axios'
|
||||
import { GetSessionsRequest } from '@linux-odyssey/constants'
|
||||
import { Session } from '../types'
|
||||
|
||||
const api = axios.create({
|
||||
@@ -16,13 +15,6 @@ export async function createSession(questId: string): Promise<Session> {
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function getSessions(
|
||||
request: GetSessionsRequest
|
||||
): Promise<Session[]> {
|
||||
const res = await api.get<Session[]>('/sessions', { params: request })
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function getActiveSession(
|
||||
questId: string
|
||||
): Promise<Session | null> {
|
||||
|
||||
Reference in new issue
Block a user