tibi-starter/api/hooks/ssr/post_bind.js

17 lines
320 B
JavaScript

const utils = require("../lib/utils")
;(function () {
if (context.request().query("clear")) {
utils.clearSSRCache()
throw {
status: 200,
message: "cache cleared",
}
}
throw {
status: 500,
message: "ssr is only a dummy collection",
}
})()