mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update apps api routes
This commit is contained in:
parent
4592a7d79d
commit
89086a8003
3 changed files with 3 additions and 3 deletions
|
@ -100,7 +100,7 @@ export default {
|
||||||
// FIXME api expects at least one argument ?! (fake one given with { dontmindthis } )
|
// FIXME api expects at least one argument ?! (fake one given with { dontmindthis } )
|
||||||
const args = objectToParams(action.form ? formatFormData(action.form) : { dontmindthis: undefined })
|
const args = objectToParams(action.form ? formatFormData(action.form) : { dontmindthis: undefined })
|
||||||
|
|
||||||
api.put(`apps/${this.id}/actions/${action.id}`, { args }).then(response => {
|
api.put(`apps/${this.id}/actions/${action.id}`, { args }).then(() => {
|
||||||
this.$refs.view.fetchQueries()
|
this.$refs.view.fetchQueries()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
if (err.name !== 'APIBadRequestError') throw err
|
if (err.name !== 'APIBadRequestError') throw err
|
||||||
|
|
|
@ -164,7 +164,7 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
queries: [
|
queries: [
|
||||||
['GET', 'appscatalog?full&with_categories']
|
['GET', 'apps/catalog?full&with_categories']
|
||||||
],
|
],
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
||||||
applyConfig (id_) {
|
applyConfig (id_) {
|
||||||
const args = objectToParams(formatFormData(this.forms[id_]))
|
const args = objectToParams(formatFormData(this.forms[id_]))
|
||||||
|
|
||||||
api.post(`apps/${this.id}/config`, { args }).then(response => {
|
api.put(`apps/${this.id}/config`, { args }).then(response => {
|
||||||
console.log('SUCCESS', response)
|
console.log('SUCCESS', response)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
if (err.name !== 'APIBadRequestError') throw err
|
if (err.name !== 'APIBadRequestError') throw err
|
||||||
|
|
Loading…
Add table
Reference in a new issue