-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
db.run()
type signature in production (#10566)
* deps: bump drizzle to latest patch * chore: changeset * feat(test): db.run output
- Loading branch information
1 parent
5f7e9c4
commit b5a8040
Showing
5 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astrojs/db": patch | ||
--- | ||
|
||
Fix `db.run()` type signature in production. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// <reference types="@astrojs/db" /> | ||
import type { APIRoute } from 'astro'; | ||
import { db, sql } from 'astro:db'; | ||
|
||
export const GET: APIRoute = async () => { | ||
const authors = await db.run(sql`SELECT * FROM Author`); | ||
return new Response(JSON.stringify(authors), { | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
}); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.