1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { chorus_get_mag_data } from "https://esm.town/v/hyperglitch/chorus_get_mag_data";
import { chorus_stored_data } from "https://esm.town/v/hyperglitch/chorus_stored_data";
import process from "node:process";
export async function chorus_get_all_data(auth, cached) {
// check auth
if (auth != process.env.chorus_access) {
return "";
}
if (cached)
return chorus_stored_data;
else
return await chorus_get_mag_data();
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023