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