Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import * as bcrypt from "https://deno.land/x/bcrypt@v0.4.1/mod.ts";
import { sqlite } from "https://esm.town/v/std/sqlite";
export default async function(req: Request): Promise<Response> {
const TABLE_NAME = "lab_login_users_with_times";
// get status, name, and last_updated cols
// const query = await sqlite.execute({
// sql: `SELECT status, username, last_updated FROM ${TABLE_NAME}`,
// args: [],
// });
// get status, name, and last_updated cols where banned is zero
const query = await sqlite.execute({
sql: `SELECT status, username, last_updated, gif, banned FROM ${TABLE_NAME} WHERE banned = 0`,
args: [],
});
return new Response(JSON.stringify(query.rows), { status: 200 });
}
evol-lablogingetusers.web.val.run
August 30, 2024