fix: Use insertAndFetch to get record with after find modifications

This commit is contained in:
Faruk AYDIN
2024-03-13 13:13:15 +01:00
parent 8f7f6dc19e
commit d6923a2ff0

View File

@@ -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;
};