You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
554 B
26 lines
554 B
import { fetch } from './fetch'
|
|
|
|
interface AvailabilityResponse {
|
|
id: string
|
|
available: boolean
|
|
}
|
|
|
|
export async function fetchGroupAvailability(name: string) {
|
|
return await fetch<AvailabilityResponse>({
|
|
path: '/api/group/available',
|
|
method: 'post',
|
|
body: {
|
|
name,
|
|
},
|
|
})
|
|
}
|
|
|
|
export async function fetchUserAvailability(name: string) {
|
|
return await fetch<AvailabilityResponse>({
|
|
path: '/api/user/available',
|
|
method: 'post',
|
|
body: {
|
|
name,
|
|
},
|
|
})
|
|
}
|