Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and itsMapleLeaf committed Mar 7, 2024
1 parent b754d8b commit bbf6454
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 17 deletions.
6 changes: 3 additions & 3 deletions templates/studio-template-blog/db/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineDB, defineTable, column, NOW } from 'astro:db';
import { NOW, column, defineDB, defineTable } from 'astro:db';

const Blog = defineTable({
columns: {
Expand All @@ -13,11 +13,11 @@ const Blog = defineTable({
}),
content: column.text({ multiline: true }),
},
}),
});

// https://astro.build/db/config
export default defineDB({
tables: {
Blog
Blog,
},
});
3 changes: 1 addition & 2 deletions templates/studio-template-blog/db/seed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { db, Blog } from 'astro:db';
import { readFile } from 'node:fs/promises';
import { Blog, db } from 'astro:db';

// https://astro.build/db/seed
export default async function seed() {
Expand Down Expand Up @@ -42,5 +42,4 @@ export default async function seed() {
content: lipsum,
},
]);

}
2 changes: 1 addition & 1 deletion templates/studio-template-blog/src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function GET(context: APIContext) {
return rss({
title: SITE_TITLE,
description: SITE_DESCRIPTION,
site: context.site!,
site: context.site ?? 'https://example.com',
items: posts.map((post) => ({
title: post.title,
description: post.description,
Expand Down
2 changes: 1 addition & 1 deletion templates/studio-template-empty/db/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { defineDB } from 'astro:db';

// https://astro.build/db/config
export default defineDB({
tables: {}
tables: {},
});
2 changes: 1 addition & 1 deletion templates/studio-template-jobboard/db/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineDB, defineTable, column, NOW } from 'astro:db';
import { NOW, column, defineDB, defineTable } from 'astro:db';

export const Company = defineTable({
columns: {
Expand Down
3 changes: 1 addition & 2 deletions templates/studio-template-jobboard/db/seed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, Company, JobPosting, JobType } from 'astro:db';
import { Company, JobPosting, JobType, db } from 'astro:db';

// https://astro.build/db/seed
export default async function seed() {
Expand Down Expand Up @@ -115,5 +115,4 @@ export default async function seed() {
</p>`,
},
]);

}
2 changes: 1 addition & 1 deletion templates/studio-template-waitlist/db/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineDB, defineTable, column } from 'astro:db';
import { column, defineDB, defineTable } from 'astro:db';

export const Signup = defineTable({
columns: {
Expand Down
8 changes: 2 additions & 6 deletions templates/studio-template-waitlist/db/seed.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { db, Signup } from 'astro:db';
import { Signup, db } from 'astro:db';

// https://astro.build/db/seed
export default async function seed() {
await db
.insert(Signup)
.values([
{ email: '[email protected]' },
]);
await db.insert(Signup).values([{ email: '[email protected]' }]);
}

0 comments on commit bbf6454

Please sign in to comment.