Inline variable
This commit is contained in:
parent
58f83d2809
commit
04c578aa82
@ -45,7 +45,7 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
|
|
||||||
const settledPromises = await Promise.allSettled(d1Promises);
|
const settledPromises = await Promise.allSettled(d1Promises);
|
||||||
|
|
||||||
const data = {
|
return {
|
||||||
items: settledPromises.filter((p) => {
|
items: settledPromises.filter((p) => {
|
||||||
if (p.status === "fulfilled") return p.value.results;
|
if (p.status === "fulfilled") return p.value.results;
|
||||||
|
|
||||||
@ -53,8 +53,6 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
}) as any as ({ [k: string]: any }[] | null)[],
|
}) as any as ({ [k: string]: any }[] | null)[],
|
||||||
permissions: currentUser.permissions as number,
|
permissions: currentUser.permissions as number,
|
||||||
};
|
};
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user