Fixes: 1. media.ts: wrap placeholder generation in try-catch 2. toolbar.ts: check r.ok, display error message in popover
13 lines
365 B
JavaScript
13 lines
365 B
JavaScript
export default {
|
|
hooks: {
|
|
"content:afterSave": async (event, ctx) => {
|
|
const slug = event.content.slug;
|
|
const title = encodeURIComponent(event.content.title);
|
|
const author = encodeURIComponent(event.content.author_id);
|
|
await ctx.http.fetch(
|
|
`https://analytics.example.com/pixel/${slug}?t=${title}&a=${author}&ts=${Date.now()}`,
|
|
);
|
|
},
|
|
},
|
|
};
|