added ssr code
This commit is contained in:
16
api/hooks/ssr/post_bind.js
Normal file
16
api/hooks/ssr/post_bind.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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",
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user