fix(zim): adicionar método deleteZimFile ausente no API client

O Content Manager chamava api.deleteZimFile() para deletar arquivos
ZIM, mas esse método nunca foi implementado na classe API, causando
"TypeError: deleteZimFile is not a function".

O backend (DELETE /api/zim/:filename → ZimController.delete) já
existia e funcionava corretamente — só faltava o método no client
frontend que faz a ponte.

Closes #372
This commit is contained in:
LuisMIguelFurlanettoSousa 2026-03-23 13:47:24 -03:00 committed by Jake Turner
parent e9eb444ead
commit 28c0540dbe

View File

@ -518,6 +518,13 @@ class API {
})()
}
async deleteZimFile(filename: string) {
return catchInternal(async () => {
const response = await this.client.delete<{ message: string }>(`/zim/${filename}`)
return response.data
})()
}
async listZimFiles() {
return catchInternal(async () => {
return await this.client.get<ListZimFilesResponse>('/zim/list')