Public
Cron
Forked from case/manifold_daily_loan_collector
Runs every 1 days
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export default async function() {
const res = await fetch("https://api.manifold.markets/request-loan", {
headers: {
Authorization: `Key ${Deno.env.get("manifoldApiKey")}`,
},
});
if (!res.ok) {
const body = await res.text();
return new Error(body ?? "Error requesting loan");
}
return res.json();
}
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!
March 9, 2024