tibi-docs/api/hooks/ssr/post_bind.js
Sebastian Frank 1ebd1424e5
Some checks failed
deploy to production / deploy (push) Failing after 52s
ssr via fetch
2024-04-10 08:26:40 +00:00

26 lines
550 B
JavaScript

const { release } = require("../config-client")
var utils = require("../lib/utils")
;(function () {
if (context.request().query("clear")) {
console.log("CLEARING SSR CACHE")
var removed = utils.clearSSRCache()
var stats = {
status: 200,
message: "ok",
removed: removed,
release: release,
}
utils.log(stats)
throw stats
}
throw {
status: 500,
message: "ssr is only a dummy collection",
release: release,
}
})()