|
|
@@ -47,9 +47,8 @@ async function add(params) {
|
|
|
});
|
|
|
} else {
|
|
|
// Mysql and sqlite don't support returning but return the inserted id by default
|
|
|
- [id] = await knex("hosts")
|
|
|
- .insert(newHost)
|
|
|
- .returning('*');
|
|
|
+ const [createdHost] = await knex("hosts").insert(newHost).returning('*');
|
|
|
+ id = createdHost.id;
|
|
|
}
|
|
|
|
|
|
// Query domain instead of using returning as sqlite and mysql don't support it
|