This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
const apiSsrBaseURL = "http://localhost:8080/api/v1/_/allkids_erfurt"
|
||||
const apiSsrBaseURL =
|
||||
"http://localhost:" + context.config.server().api.port + "/api/v1/_/" + context.api().namespace + "/"
|
||||
|
||||
module.exports = {
|
||||
apiSsrBaseURL,
|
||||
ssrValidatePath: function (path) {
|
||||
ssrValidatePath: function (/** @type {string} */ path) {
|
||||
// validate if path ssr rendering is ok, -1 = NOTFOUND, 0 = NO SSR, 1 = SSR
|
||||
// pe. use context.readCollection("product", {filter: {path: path}}) ... to validate dynamic urls
|
||||
|
||||
@@ -11,7 +12,6 @@ module.exports = {
|
||||
|
||||
// // all other sites are in db
|
||||
//path = path?.replace(/^\//, "")
|
||||
console.log("PATH:", path)
|
||||
const resp = context.db.find("content", {
|
||||
filter: {
|
||||
$and: [{ path }],
|
||||
@@ -19,7 +19,6 @@ module.exports = {
|
||||
|
||||
selector: { _id: 1 },
|
||||
})
|
||||
console.log("RESP:", resp?.length)
|
||||
if (resp && resp.length) {
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user