Skip to content

Commit

Permalink
fix: stop parsing JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jul 7, 2024
1 parent 4211e9b commit da9ad42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export default {
});
}
const webhookPayload = await request.json();
const settings = Value.Decode(commandQueryUserScheme, Value.Default(commandQueryUserScheme, JSON.parse(webhookPayload.settings)));
webhookPayload.eventPayload = JSON.parse(webhookPayload.eventPayload);
webhookPayload.settings = settings;
webhookPayload.settings = Value.Decode(commandQueryUserScheme, Value.Default(commandQueryUserScheme, JSON.parse(webhookPayload.settings)));
await run(webhookPayload, env);
return new Response(JSON.stringify("OK"), { status: 200, headers: { "content-type": "application/json" } });
} catch (error) {
Expand Down

0 comments on commit da9ad42

Please sign in to comment.