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
|
||||
).toString();
|
||||
|
||||
const connection = await Connection.query().insert(params).returning('*');
|
||||
const connection = await Connection.query().insertAndFetch(params);
|
||||
|
||||
return connection;
|
||||
};
|
||||
|
Reference in New Issue
Block a user