refactor: change page-hash delete all endpoint

This commit is contained in:
Gauthier Roebroeck 2022-02-08 12:25:56 +08:00
parent ca401f8b69
commit a972b5fde0
3 changed files with 4 additions and 4 deletions

View file

@ -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
}
},

View file

@ -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}),
})

View file

@ -120,7 +120,7 @@ class PageHashController(
}
}
@PostMapping("{pageHash}/perform-delete")
@PostMapping("{pageHash}/delete-all")
@ResponseStatus(HttpStatus.ACCEPTED)
fun performDelete(
@PathVariable pageHash: String,