🍓🖼️🍹 A small thing where I can upload a file and get a link back. https://media.strawmelonjuice.com/
1import { Database } from "bun:sqlite";
2
3const db = new Database("./data/app.db");
4db.exec(`PRAGMA journal_mode = WAL`);
5
6const username = prompt("Enter the username to elevate to admin:");
7const user = db.query(`SELECT * FROM users WHERE username = ?`).get(username);
8
9if (!user) {
10 console.error("User not found.");
11 process.exit(1);
12}
13
14db.exec(`UPDATE users SET is_admin = 1 WHERE username = ?`, [username]);
15console.log("User elevated to admin successfully.");
16db.close();