fix
This commit is contained in:
parent
aba7764107
commit
a37399adfa
|
|
@ -51,7 +51,7 @@ async (arg: TableOnLoad) => {
|
|||
const items = await db.${table}.findMany({
|
||||
select: ${JSON.stringify(select, null, 2).split("\n").join("\n ")},
|
||||
orderBy: arg.orderBy || {
|
||||
id: "desc",
|
||||
${pk}: "desc",
|
||||
},
|
||||
where: {
|
||||
...where,
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ const get_layer = async (
|
|||
if (current < depth) {
|
||||
if (rels) {
|
||||
for (const [k, v] of Object.entries(rels)) {
|
||||
if (v?.to && v?.from) {
|
||||
const to = v.to;
|
||||
const from = v.from;
|
||||
const r_rels = (await get_layer(
|
||||
|
|
@ -110,6 +111,7 @@ const get_layer = async (
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export const gen_props_table = async () => {
|
|||
|
||||
if (cache.length > 0) return cache;
|
||||
const tables = await db._schema.tables();
|
||||
console.log(tables);
|
||||
if (!Array.isArray(tables)) {
|
||||
alert("WARNING: failed to get tables from app server");
|
||||
return [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue