mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
fix update-app
This commit is contained in:
@ -65,7 +65,9 @@ export default {
|
|||||||
async onUpdateApp () {
|
async onUpdateApp () {
|
||||||
try {
|
try {
|
||||||
this.isUpdating = true
|
this.isUpdating = true
|
||||||
|
this.updateData.installed = this.currentVersion
|
||||||
let res = await window.axios.post('/api/update', this.updateData)
|
let res = await window.axios.post('/api/update', this.updateData)
|
||||||
|
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.isUpdateAvailable = false
|
this.isUpdateAvailable = false
|
||||||
window.toastr['success'](this.$t('settings.update_app.update_success'))
|
window.toastr['success'](this.$t('settings.update_app.update_success'))
|
||||||
@ -95,7 +97,7 @@ export default {
|
|||||||
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.updateData.isMinor = response.data.is_minor
|
this.updateData.isMinor = response.data.is_minor
|
||||||
this.updateData.version = response.data.version
|
this.updateData.version = response.data.version.version
|
||||||
this.description = response.data.description
|
this.description = response.data.description
|
||||||
this.isUpdateAvailable = true
|
this.isUpdateAvailable = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user