url -> long_url

This commit is contained in:
Elijah McMorris 2024-02-15 19:14:45 -08:00
parent b15cac7ed0
commit dbf0b5d670
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
21 changed files with 237 additions and 175 deletions

12
src/app/[slug]/db.tsx Normal file
View file

@ -0,0 +1,12 @@
"use server";
import { initConnection } from "@/components/db-utils";
export async function querydb(slug: string) {
let db = await initConnection();
let long_url = await db.query(`
select * from url:[$id];
`, { id: slug });
console.log(long_url, slug)
return long_url;
}