nbbaier-envvals.web.val.run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { fetchPaginatedData } from "https://esm.town/v/nbbaier/fetchPaginatedData";
import { paginatedResponse } from "https://esm.town/v/nbbaier/paginatedResponse";
import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
const id = "5d1042a9-7b0b-499d-8a72-3a8ac7a4e185";
// https://api.val.town/v1/users/${user:me}/vals
const res = await fetchPaginatedData(
`${API_URL}/v1/users/${id}/vals`,
{
headers: { Authorization: `Bearer ${Deno.env.get("valtown")}` },
},
);
const vals = res.filter(
(v) => v.code.includes("process.env") || v.code.includes("Deno.env"),
);
export default async function(req: Request): Promise<Response> {
return paginatedResponse(req, vals);
}
Only the latest version can be previewed
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!
v3
April 11, 2024