Skip to content

Commit 1c89808

Browse files
committed
chore: minor refactor
1 parent 64ace68 commit 1c89808

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/backend/src/services/connection.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ export const getConnection = async (params: GetConnectionParams) => {
2626
// it could be their own connection or a shared connection
2727
// 2. the user is the owner of a pipe that has been transferred to them
2828
// it should include connections from the flow_connections table as well
29-
//
3029
// TODO (kevinkim-ogp): phase 2 will allow editors to add their own connections, so owner's connections
3130
// will need to include connections from the flow_connections table
3231

33-
const connection = await Connection.query(trx)
32+
return await Connection.query(trx)
3433
.findById(connectionId)
3534
.where(function () {
3635
// connection is either owned by the user
@@ -42,8 +41,6 @@ export const getConnection = async (params: GetConnectionParams) => {
4241
)
4342
})
4443
.throwIfNotFound({ message: 'Connection not found' })
45-
46-
return connection
4744
}
4845

4946
// NOTE: editor and viewer can only access shared connections from the flow_connections table

0 commit comments

Comments
 (0)