mirror of
https://github.com/gotson/komga.git
synced 2025-12-23 17:03:00 +01:00
refactor: change page-hash delete all endpoint
This commit is contained in:
parent
ca401f8b69
commit
a972b5fde0
3 changed files with 4 additions and 4 deletions
|
|
@ -143,7 +143,7 @@ export default Vue.extend({
|
|||
},
|
||||
async deleteMatches() {
|
||||
if(!this.deleteRequested) {
|
||||
await this.$komgaPageHashes.performDelete(this.hash)
|
||||
await this.$komgaPageHashes.deleteAllMatches(this.hash)
|
||||
this.deleteRequested = true
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -82,13 +82,13 @@ export default class KomgaPageHashesService {
|
|||
}
|
||||
}
|
||||
|
||||
async performDelete(pageHash: PageHashKnownDto) {
|
||||
async deleteAllMatches(pageHash: PageHashKnownDto) {
|
||||
try {
|
||||
const params = {
|
||||
media_type: pageHash.mediaType,
|
||||
file_size: pageHash.size || -1,
|
||||
}
|
||||
await this.http.post(`${API_PAGE_HASH}/${pageHash.hash}/perform-delete`, pageHash, {
|
||||
await this.http.post(`${API_PAGE_HASH}/${pageHash.hash}/delete-all`, pageHash, {
|
||||
params: params,
|
||||
paramsSerializer: params => qs.stringify(params, {indices: false}),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class PageHashController(
|
|||
}
|
||||
}
|
||||
|
||||
@PostMapping("{pageHash}/perform-delete")
|
||||
@PostMapping("{pageHash}/delete-all")
|
||||
@ResponseStatus(HttpStatus.ACCEPTED)
|
||||
fun performDelete(
|
||||
@PathVariable pageHash: String,
|
||||
|
|
|
|||
Loading…
Reference in a new issue