mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
e14ce5726d
commit
f00ecd4596
1 changed files with 8 additions and 8 deletions
|
@ -78,14 +78,14 @@ export function createRemoteDatabaseClient(appToken: string, remoteDbURL: string
|
||||||
// Using `db.run()` drizzle massages the rows into an object.
|
// Using `db.run()` drizzle massages the rows into an object.
|
||||||
// So in order to make dev/prod consistent, we need to do the same here.
|
// So in order to make dev/prod consistent, we need to do the same here.
|
||||||
// This creates an object and loops over each row replacing it with the object.
|
// This creates an object and loops over each row replacing it with the object.
|
||||||
for(let i = 0; i < remoteResult.rows.length; i++) {
|
for (let i = 0; i < remoteResult.rows.length; i++) {
|
||||||
let row = remoteResult.rows[i];
|
let row = remoteResult.rows[i];
|
||||||
let item: Record<string, any> = {};
|
let item: Record<string, any> = {};
|
||||||
remoteResult.columns.forEach((col, index) => {
|
remoteResult.columns.forEach((col, index) => {
|
||||||
item[col] = row[index];
|
item[col] = row[index];
|
||||||
});
|
});
|
||||||
(remoteResult as any).rows[i] = item;
|
(remoteResult as any).rows[i] = item;
|
||||||
}
|
}
|
||||||
return remoteResult;
|
return remoteResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue