refactor: Use objection instead of knex for factories
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user