mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 11:39:26 +01:00
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:
parent
e9eb444ead
commit
28c0540dbe
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user