Trying out cookie system
This commit is contained in:
parent
cf795eb90e
commit
6346565a1c
|
@ -176,5 +176,5 @@ async function csetforetell_inner(cookie){
|
|||
|
||||
export async function csetforetell(){
|
||||
let cookie = process.env.CSETFORETELL_COOKIE || getCookie("csetforetell")
|
||||
await applyIfCookieExists(csetforetell_inner, cookie)
|
||||
await applyIfCookieExists(cookie, csetforetell_inner)
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ async function goodjudgmentopen_inner(cookie) {
|
|||
console.log(`Took ${difference / 1000} seconds, or ${difference / (1000 * 60)} minutes.`)
|
||||
}
|
||||
|
||||
export async function goodjudmentopen(){
|
||||
let cookie = process.env.GOODJUDGMENTOPENCOOKIE || getCookie("goodjudgmentopen")
|
||||
await applyIfCookieExists(goodjudgmentopen_inner, cookie)
|
||||
export async function goodjudgmentopen(){
|
||||
let cookie = process.env.GOODJUDGMENTOPENCOOKIE || getCookie("goodjudmentopen")
|
||||
await applyIfCookieExists(cookie, goodjudgmentopen_inner)
|
||||
}
|
||||
|
|
|
@ -220,5 +220,5 @@ async function hypermind_inner(cookie) {
|
|||
|
||||
export async function hypermind() {
|
||||
let cookie = process.env.HYPERMINDCOOKIE || getCookie("hypermind")
|
||||
await applyIfCookieExists(hypermind_inner, cookie)
|
||||
await applyIfCookieExists(cookie, hypermind_inner)
|
||||
}
|
|
@ -2,7 +2,9 @@ import { writeFileSync } from "fs"
|
|||
import { mongoReadWithReadCredentials, upsert } from "./mongo-wrapper.js"
|
||||
let mongoRead = mongoReadWithReadCredentials
|
||||
let isEmptyArray = arr => arr.length == 0
|
||||
|
||||
export async function addToHistory(){
|
||||
// throw new Error("Not today")
|
||||
let currentJSON = await mongoRead("metaforecasts")
|
||||
// console.log(currentJSON)
|
||||
let historyJSON = await mongoRead("metaforecast_history")
|
||||
|
|
|
@ -10,5 +10,5 @@ export async function rebuildNetlifySiteWithNewData_inner(cookie){
|
|||
|
||||
export async function rebuildNetlifySiteWithNewData(){
|
||||
let cookie = process.env.REBUIDNETLIFYHOOKURL || getCookie("netlify");
|
||||
await applyIfCookieExists(rebuildNetlifySiteWithNewData_inner, cookie)
|
||||
await applyIfCookieExists(cookie, rebuildNetlifySiteWithNewData_inner)
|
||||
}
|
Loading…
Reference in New Issue
Block a user