mirror of
https://github.com/withastro/astro.git
synced 2025-02-10 22:38:53 -05:00
chore: remove as any
on seed values
This commit is contained in:
parent
25f940fe49
commit
1ef45b1a09
1 changed files with 2 additions and 9 deletions
|
@ -51,15 +51,8 @@ export async function setupDbTables({
|
||||||
async seed({ table }, values) {
|
async seed({ table }, values) {
|
||||||
const result = Array.isArray(values)
|
const result = Array.isArray(values)
|
||||||
? // TODO: fix values typing once we can infer fields type correctly
|
? // TODO: fix values typing once we can infer fields type correctly
|
||||||
await db
|
await db.insert(table).values(values).returning()
|
||||||
.insert(table)
|
: await db.insert(table).values(values).returning().get();
|
||||||
.values(values as any)
|
|
||||||
.returning()
|
|
||||||
: await db
|
|
||||||
.insert(table)
|
|
||||||
.values(values as any)
|
|
||||||
.returning()
|
|
||||||
.get();
|
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
db,
|
db,
|
||||||
|
|
Loading…
Add table
Reference in a new issue