tibi-svelte-starter/api/hooks/articles/put_update.js

12 lines
326 B
JavaScript

// @ts-check
const { generateArticleSlugUrlString: generateSlugUrlStringByArticle } = require("../lib/helper")
;(function () {
/** @type {import("tibi-types").HookResponse} */
let hookResponse
context.data.article.content.slug = generateSlugUrlStringByArticle(context.data.article)
return hookResponse
})()