Skip to content

Commit

Permalink
Merge pull request actions#4 from Keyrxng/main
Browse files Browse the repository at this point in the history
Update workflow trigger
  • Loading branch information
gentlementlegen authored Jun 25, 2024
2 parents a7bb0fc + c0beca3 commit cf32c8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
}

const webhookPayload = await request.json();
const settings = Value.Decode(pluginSettingsSchema, Value.Default(pluginSettingsSchema, JSON.parse(webhookPayload.settings)));
const settings = Value.Decode(pluginSettingsSchema, Value.Default(pluginSettingsSchema, webhookPayload.settings));

if (!pluginSettingsValidator.test(settings)) {
const errors: string[] = [];
Expand All @@ -45,7 +45,6 @@ export default {
});
}

webhookPayload.eventPayload = JSON.parse(webhookPayload.eventPayload);
webhookPayload.settings = settings;
await plugin(webhookPayload, env);
return new Response(JSON.stringify("OK"), { status: 200, headers: { "content-type": "application/json" } });
Expand Down

0 comments on commit cf32c8f

Please sign in to comment.