opensourceBIM / BIMserver-JavaScript-API

BIMserver JavaScript API
GNU Lesser General Public License v3.0
56 stars 35 forks source link

Model.load(..) fails if called with deep=true #32

Open GiacomoManzoli opened 5 years ago

GiacomoManzoli commented 5 years ago

Hi,

i've noticed that Model.load doesn't call the callback if called with deep=true. i.e.:

const client = new bimserverapi.BimServerClient(SERVER_ADDRESS);
// ...
client.getModel(
                poid,
                roid,
                schema,
                true, // deep
                loadedModel => {
                    console.log("Model loaded!");
                },
                "TestModel"
            );

this is due to the missing query param in the download call: https://github.com/opensourceBIM/BIMserver-JavaScript-API/blob/fbe734c4d8afecff32977b9afb45ac0dc2d2c221/model.js#L40-L44

This is also confirmed by the BIMServer, which logs

12:06:45 ERROR [qtp669700766-34]: Missing parameter: download -> query      

when the above code is executed