fix: list of models
This commit is contained in:
parent
f377328367
commit
16fb183d70
@ -41,7 +41,7 @@ async function getModelsFromBox(id_box: number): Promise<Array<Model>> {
|
|||||||
const res = await client.query(`SELECT * FROM modeles_faisables_boite($1);`, [id_box]);
|
const res = await client.query(`SELECT * FROM modeles_faisables_boite($1);`, [id_box]);
|
||||||
const arr: Array<Model> = new Array();
|
const arr: Array<Model> = new Array();
|
||||||
for (let i = 0; i < res.rows.length; ++i) {
|
for (let i = 0; i < res.rows.length; ++i) {
|
||||||
const model: Either<Model, string> = await modelService.getModel(res.rows[i]['id_model']);
|
const model: Either<Model, string> = await modelService.getModel(res.rows[i]['id_modele']);
|
||||||
if (model.hasRight)
|
if (model.hasRight)
|
||||||
continue;
|
continue;
|
||||||
arr.push(model.left);
|
arr.push(model.left);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user