update services api routes

This commit is contained in:
axolotle 2021-03-22 18:55:05 +01:00
parent 9657fc410e
commit e94d43566a

View file

@ -120,13 +120,7 @@ export default {
)
if (!confirmed) return
if (!['start', 'restart', 'stop'].includes(action)) return
const method = action === 'stop' ? 'delete' : 'put'
const uri = action === 'restart'
? `services/${this.name}/restart`
: 'services/' + this.name
api[method](uri).then(this.$refs.view.fetchQueries)
api.put(`services/${this.name}/${action}`).then(this.$refs.view.fetchQueries)
},
shareLogs () {