Change service edit endpoint

This commit is contained in:
Sergey Shkurov 2023-04-29 01:31:46 +02:00
parent 2cbc08f79e
commit f33613ed6b

View File

@ -102,7 +102,16 @@
return;
}
console.debug('Submitting service...', this.service, this.creating);
this.$http.post('service/', this.service)
let url;
if (this.creating) {
url = 'service/';
} else {
url = 'service/' + this.initialService.port
}
this.$http.post(url, this.service)
.then(response => {
console.info('Done editing/creating service', response.data);
this.$emit('service-update-needed');