1
2
3
4
5
6
7
8
9
10
11
12
13
import { blob } from "https://esm.town/v/std/blob";
import { getSupporters } from "https://esm.town/v/todepond/getSupporters";
import process from "node:process";
export async function loginAndGetSupporter(secret) {
const supporters = await getSupporters(process.env.FAME_ADMIN_PASSWORD);
const supporter = supporters.find((s) => s.secret === secret);
if (!supporter) {
return null;
}
return supporter;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.