Support updated servers backup route schema, remove backup locking (#5053)

* Use backup physical_id for progress updates matching

* Remove locking

* Fmt
This commit is contained in:
François-Xavier Talbot
2026-01-05 20:03:46 -05:00
committed by GitHub
parent 2e9730ea1f
commit 7eb1b38cc7
8 changed files with 22 additions and 136 deletions

View File

@@ -52,24 +52,6 @@ export class ArchonBackupsV0Module extends AbstractModule {
})
}
/** POST /modrinth/v0/servers/:server_id/backups/:backup_id/lock */
public async lock(serverId: string, backupId: string): Promise<void> {
await this.client.request<void>(`/servers/${serverId}/backups/${backupId}/lock`, {
api: 'archon',
version: 'modrinth/v0',
method: 'POST',
})
}
/** POST /modrinth/v0/servers/:server_id/backups/:backup_id/unlock */
public async unlock(serverId: string, backupId: string): Promise<void> {
await this.client.request<void>(`/servers/${serverId}/backups/${backupId}/unlock`, {
api: 'archon',
version: 'modrinth/v0',
method: 'POST',
})
}
/** POST /modrinth/v0/servers/:server_id/backups/:backup_id/retry */
public async retry(serverId: string, backupId: string): Promise<void> {
await this.client.request<void>(`/servers/${serverId}/backups/${backupId}/retry`, {

View File

@@ -76,32 +76,6 @@ export class ArchonBackupsV1Module extends AbstractModule {
})
}
/** POST /v1/:server_id/worlds/:world_id/backups/:backup_id/lock */
public async lock(
serverId: string,
backupId: string,
worldId: string = DEFAULT_WORLD_ID,
): Promise<void> {
await this.client.request<void>(`/${serverId}/worlds/${worldId}/backups/${backupId}/lock`, {
api: 'archon',
version: 1,
method: 'POST',
})
}
/** POST /v1/:server_id/worlds/:world_id/backups/:backup_id/unlock */
public async unlock(
serverId: string,
backupId: string,
worldId: string = DEFAULT_WORLD_ID,
): Promise<void> {
await this.client.request<void>(`/${serverId}/worlds/${worldId}/backups/${backupId}/unlock`, {
api: 'archon',
version: 1,
method: 'POST',
})
}
/** POST /v1/:server_id/worlds/:world_id/backups/:backup_id/retry */
public async retry(
serverId: string,

View File

@@ -174,9 +174,9 @@ export namespace Archon {
export type Backup = {
id: string
physical_id?: string
name: string
created_at: string
locked: boolean
automated: boolean
interrupted: boolean
ongoing: boolean