fix: Use insertAndFetch to get record with after find modifications
This commit is contained in:
@@ -17,7 +17,7 @@ export const createConnection = async (params = {}) => {
|
|||||||
appConfig.encryptionKey
|
appConfig.encryptionKey
|
||||||
).toString();
|
).toString();
|
||||||
|
|
||||||
const connection = await Connection.query().insert(params).returning('*');
|
const connection = await Connection.query().insertAndFetch(params);
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user