Skip to content

Commit 08bf389

Browse files
committed
Fix updating clients in Vue
1 parent e82a6d2 commit 08bf389

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

resources/js/components/Clients.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,10 @@
303303
*/
304304
store() {
305305
this.persistClient(
306-
'post', '/oauth/clients',
307-
this.createForm, '#modal-create-client'
306+
'post',
307+
'/oauth/clients',
308+
this.createForm,
309+
'#modal-create-client'
308310
);
309311
},
310312
@@ -324,8 +326,10 @@
324326
*/
325327
update() {
326328
this.persistClient(
327-
'put', '/oauth/clients/' + this.editForm.id,
328-
this.editForm, '#modal-edit-client'
329+
'put',
330+
'/oauth/clients/' + this.editForm.id,
331+
this.editForm,
332+
'#modal-edit-client'
329333
);
330334
},
331335
@@ -337,7 +341,11 @@
337341
338342
axios[method](uri, form)
339343
.then(response => {
340-
this.clients.push(response.data);
344+
if (method === 'post') {
345+
this.clients.push(response.data);
346+
} else {
347+
this.getClients();
348+
}
341349
342350
form.name = '';
343351
form.redirect = '';

0 commit comments

Comments
 (0)