🍊
This commit is contained in:
@@ -5,7 +5,7 @@ import settings from '../settings'
|
||||
|
||||
const apiUrl = '/api'
|
||||
|
||||
export const createClient = async (body: Client) => {
|
||||
export const createClient = async (body: Omit<Client, 'photos'>) => {
|
||||
await axios.post(`${apiUrl}/clients`, body)
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ export const getClient = async (id: string): Promise<Client> => {
|
||||
return res.data
|
||||
}
|
||||
export const startSession = async (clientId: string) => {
|
||||
const res = await axios.post(`${apiUrl}/clients/${clientId}/session`)
|
||||
const res = await axios.post(`${apiUrl}/clients/${clientId}`)
|
||||
return res.data // session data
|
||||
}
|
||||
|
||||
export const killSession = async (clientId: string) => {
|
||||
await axios.delete(`${apiUrl}/clients/${clientId}/session`)
|
||||
await axios.delete(`${apiUrl}/clients/${clientId}`)
|
||||
}
|
||||
|
||||
export const restartSession = async (clientId: string) => {
|
||||
|
Reference in New Issue
Block a user