2026-02-09 09:23:48 +01:00
|
|
|
import { api } from './client'
|
|
|
|
|
import type { Genlocke, CreateGenlockeInput, Region } from '../types/game'
|
|
|
|
|
|
|
|
|
|
export function createGenlocke(data: CreateGenlockeInput): Promise<Genlocke> {
|
|
|
|
|
return api.post('/genlockes', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getGamesByRegion(): Promise<Region[]> {
|
|
|
|
|
return api.get('/games/by-region')
|
|
|
|
|
}
|
2026-02-09 09:47:28 +01:00
|
|
|
|
|
|
|
|
export function advanceLeg(genlockeId: number, legOrder: number): Promise<Genlocke> {
|
|
|
|
|
return api.post(`/genlockes/${genlockeId}/legs/${legOrder}/advance`, {})
|
|
|
|
|
}
|