Merge pull request #6971 from firefly-iii/webhook-fix

Webhook fix
This commit is contained in:
James Cole
2023-02-04 08:12:52 +01:00
committed by GitHub
13 changed files with 95 additions and 93 deletions

View File

@@ -140,11 +140,12 @@ export default {
// post!
axios.post('./api/v1/webhooks', data).then((response) => {
this.success_message = $.text(response.data.message);
//this.success_message = $.text(response.data.message);
// console.log('Will now go to redirectUser()');
let webhookId = response.data.data.id;
window.location.href = window.previousUrl + '?webhook_id=' + webhookId + '&message=created';
}).catch((error) => {
//console.log(error.response.data);
this.error_message = error.response.data.message;
this.errors.title = error.response.data.errors.title;
this.errors.trigger = error.response.data.errors.trigger;

View File

@@ -187,11 +187,10 @@ export default {
// post!
axios.put('./api/v1/webhooks/' + this.id, data).then((response) => {
this.success_message = $.text(response.data.message);
// console.log('Will now go to redirectUser()');
let webhookId = response.data.data.id;
window.location.href = window.previousUrl + '?webhook_id=' + webhookId + '&message=updated';
}).catch((error) => {
this.error_message = error.response.data.message;
this.errors.title = error.response.data.errors.title;
this.errors.trigger = error.response.data.errors.trigger;

View File

@@ -269,6 +269,8 @@ return [
'response' => 'Response',
'visit_webhook_url' => 'Visit webhook URL',
'reset_webhook_secret' => 'Reset webhook secret',
'webhook_stored_link' => '<a href="webhooks/show/{ID}">Webhook #{ID} ("{title}")</a> has been stored.',
'webhook_updated_link' => '<a href="webhooks/show/{ID}">Webhook #{ID}</a> ("{title}") has been updated.',
// API access
'authorization_request' => 'Firefly III v:version Authorization Request',