Code
HTTP
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 = "loginredux_users";
// get status, name, and last_updated cols
const query = await sqlite.execute({
sql: `SELECT status, username, last_updated, id FROM ${TABLE_NAME} where banned = 0`,
args: [],
});
return new Response(JSON.stringify(query.rows), { status: 200 });
}
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!
mittzy-lablogingetusers.web.val.run
Updated: November 15, 2024