refactor: Use objection instead of knex for factories

This commit is contained in:
Faruk AYDIN
2024-03-20 17:24:44 +01:00
parent 359a90245d
commit 86f4cb7701
12 changed files with 21 additions and 21 deletions

View File

@@ -25,9 +25,9 @@ export const createSamlAuthProvider = async (params = {}) => {
params.defaultRoleId = params?.defaultRoleId || (await createRole()).id;
params.active = params?.active || true;
const samlAuthProvider = await SamlAuthProvider.query()
.insert(params)
.returning('*');
const samlAuthProvider = await SamlAuthProvider.query().insertAndFetch(
params
);
return samlAuthProvider;
};