update upgrade api routes

This commit is contained in:
axolotle 2021-03-22 22:07:03 +01:00
parent 6438ea5414
commit 227e359e42

View file

@ -74,7 +74,7 @@ export default {
return { return {
queries: [ queries: [
['GET', 'migrations?pending'], ['GET', 'migrations?pending'],
['PUT', 'update'] ['PUT', 'update/all']
], ],
// API data // API data
migrationsNotDone: undefined, migrationsNotDone: undefined,
@ -95,10 +95,7 @@ export default {
const confirmed = await this.$askConfirmation(confirmMsg) const confirmed = await this.$askConfirmation(confirmMsg)
if (!confirmed) return if (!confirmed) return
const uri = type === 'specific_app' const uri = id !== null ? `apps/${id}/upgrade` : 'upgrade/' + type
? 'upgrade/apps?app=' + id
: 'upgrade?' + type
api.put(uri).then(() => { api.put(uri).then(() => {
this.$router.push({ name: 'tool-logs' }) this.$router.push({ name: 'tool-logs' })
}) })