kopia lustrzana https://github.com/cloudflare/wildebeest
commit
55c0bcc9df
|
@ -15,7 +15,7 @@ export async function handleRequestGet(db: Database) {
|
||||||
export async function getAdmins(db: Database): Promise<Person[]> {
|
export async function getAdmins(db: Database): Promise<Person[]> {
|
||||||
let rows: unknown[] = []
|
let rows: unknown[] = []
|
||||||
try {
|
try {
|
||||||
const stmt = db.prepare('SELECT * FROM actors WHERE is_admin=TRUE')
|
const stmt = db.prepare('SELECT * FROM actors WHERE is_admin=1')
|
||||||
const result = await stmt.all<unknown>()
|
const result = await stmt.all<unknown>()
|
||||||
rows = result.success ? (result.results as unknown[]) : []
|
rows = result.success ? (result.results as unknown[]) : []
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Ładowanie…
Reference in New Issue