Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-05-17 18:40:09 +02:00
parent ffae1a02e9
commit b961ec8268

View File

@ -15,16 +15,20 @@ const Posts: CollectionConfig = {
afterChange: [ afterChange: [
async () => { async () => {
console.log("HALLO"); console.log("HALLO");
await fetch("https://api.github.com/repos/mooxl/astroad/dispatches", { try {
method: "POST", await fetch("https://api.github.com/repos/mooxl/astroad/dispatches", {
headers: { method: "POST",
Accept: "application/vnd.github.everest-preview+json", headers: {
Authorization: "token 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", Accept: "application/vnd.github.everest-preview+json",
}, Authorization: "token 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",
body: JSON.stringify({ },
event_type: "payload_update", body: JSON.stringify({
}), event_type: "payload_update",
}); }),
});
} catch (e) {
console.log(e);
}
}, },
], ],
}, },