Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 committed Jan 13, 2025
1 parent 95d99b4 commit 7a6d66b
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions server/src/entities/session.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,28 @@ export class SessionEntity {
deviceOS!: string;
}

const userColumns = [
'id',
'email',
'createdAt',
'profileImagePath',
'isAdmin',
'shouldChangePassword',
'deletedAt',
'oauthId',
'updatedAt',
'storageLabel',
'name',
'quotaSizeInBytes',
'quotaUsageInBytes',
'status',
'profileChangedAt',
] as const;

export const withUser = (eb: ExpressionBuilder<DB, 'sessions'>) => {
return eb
.selectFrom('users')
.select([
'id',
'email',
'createdAt',
'profileImagePath',
'isAdmin',
'shouldChangePassword',
'deletedAt',
'oauthId',
'updatedAt',
'storageLabel',
'name',
'quotaSizeInBytes',
'quotaUsageInBytes',
'status',
'profileChangedAt',
])
.select(userColumns)
.select((eb) =>
eb
.selectFrom('user_metadata')
Expand Down

0 comments on commit 7a6d66b

Please sign in to comment.