forked from
haetae.tngl.sh/fanfic-atproto
personal fork for experimenting
1import { db, Users, Works } from "astro:db";
2
3export default async function() {
4 await db.insert(Users).values([
5 { id: 1, userDid: "test" },
6 { id: 2, userDid: "another" },
7 { userDid: "did:plc:dg2qmmjic7mmecrbvpuhtvh6", nickname: "haetae" },
8 ]);
9
10 await db.insert(Works).values([
11 {
12 slug: "1234",
13 author: "test",
14 title: "Hey there title",
15 content: "<p>i have evil html</p>",
16 tags: [{ label: "test", url: "#" }],
17 },
18 {
19 slug: "1235",
20 author: "another",
21 title: "Hello world",
22 content: "<p>whoag i have <b>BOLD</b></p>",
23 tags: [{ label: "label", url: "#" }],
24 },
25 {
26 uri: "at://did:plc:dg2qmmjic7mmecrbvpuhtvh6/moe.fanfics.works/3lyeiyq32ek2o",
27 slug: "1236",
28 author: "did:plc:dg2qmmjic7mmecrbvpuhtvh6",
29 title: "testing title",
30 content: "what's up?! <b>bold</b> and <em>italics</em> should work.",
31 tags: "hey",
32 }
33 ]);
34}