db create
This commit is contained in:
parent
19ae57d449
commit
809fe18090
9 changed files with 93 additions and 35 deletions
19
src/app/create/db.tsx
Normal file
19
src/app/create/db.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use server";
|
||||
import { z } from "zod";
|
||||
import { formSchema } from "./page";
|
||||
|
||||
export async function querydb(values: z.infer<typeof formSchema>) {
|
||||
// let db = await initConnection();
|
||||
// let url = await db.query(`
|
||||
// create url:[rand::string(8)] CONTENT {
|
||||
// long_url: string::replace($long_url, "http://", "https://"),
|
||||
// clicks: 0,
|
||||
// date_added: time::now(),
|
||||
// date_accessed: <future> { time::now() }
|
||||
// } return id[0];
|
||||
// `, { long_url: values.url });
|
||||
let url = "test";
|
||||
|
||||
console.log(values.url, url)
|
||||
return url;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue