Add drag-and-drop boss reordering and new feature beans
Adds boss battle reorder API endpoint with two-phase order update to avoid unique constraint violations. Includes frontend mutation hook and API client. Also adds draft beans for progression dividers and conditional boss battle teams features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import type {
|
||||
CreateBossBattleInput,
|
||||
UpdateBossBattleInput,
|
||||
BossPokemonInput,
|
||||
BossReorderItem,
|
||||
} from '../types'
|
||||
|
||||
// Games
|
||||
@@ -123,5 +124,8 @@ export const updateBossBattle = (gameId: number, bossId: number, data: UpdateBos
|
||||
export const deleteBossBattle = (gameId: number, bossId: number) =>
|
||||
api.del(`/games/${gameId}/bosses/${bossId}`)
|
||||
|
||||
export const reorderBosses = (gameId: number, bosses: BossReorderItem[]) =>
|
||||
api.put<BossBattle[]>(`/games/${gameId}/bosses/reorder`, { bosses })
|
||||
|
||||
export const setBossTeam = (gameId: number, bossId: number, team: BossPokemonInput[]) =>
|
||||
api.put<BossBattle>(`/games/${gameId}/bosses/${bossId}/pokemon`, team)
|
||||
|
||||
Reference in New Issue
Block a user