Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-05-17 18:26:23 +02:00
parent 35a01e6754
commit d5c4c23500

View File

@ -11,7 +11,22 @@ const Posts: CollectionConfig = {
create: () => true, create: () => true,
update: () => true, update: () => true,
}, },
hooks: {
afterChange: [
async () => {
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",
}),
});
},
],
},
fields: [ fields: [
{ {
name: "title", name: "title",