mirror of
https://github.com/standardnotes/server
synced 2026-07-14 00:01:54 -04:00
fix(auth): group typeorm annotations
This commit is contained in:
@@ -13,6 +13,11 @@ export class Group {
|
||||
})
|
||||
declare type: GroupType
|
||||
|
||||
@OneToMany(() => GroupUser, (groupUser) => groupUser.group)
|
||||
@OneToMany(
|
||||
/* istanbul ignore next */
|
||||
() => GroupUser,
|
||||
/* istanbul ignore next */
|
||||
(groupUser) => groupUser.group,
|
||||
)
|
||||
declare users: Promise<User[]>
|
||||
}
|
||||
|
||||
@@ -34,11 +34,31 @@ export class GroupUser {
|
||||
})
|
||||
declare encryptedGroupKey: string
|
||||
|
||||
@ManyToOne(() => User, (user) => user.groups, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'user_uuid' })
|
||||
@ManyToOne(
|
||||
/* istanbul ignore next */
|
||||
() => User,
|
||||
/* istanbul ignore next */
|
||||
(user) => user.groups,
|
||||
/* istanbul ignore next */
|
||||
{ onDelete: 'CASCADE' },
|
||||
)
|
||||
@JoinColumn(
|
||||
/* istanbul ignore next */
|
||||
{ name: 'user_uuid' },
|
||||
)
|
||||
declare user: Promise<User>
|
||||
|
||||
@ManyToOne(() => Group, (group) => group.users, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'group_uuid' })
|
||||
@ManyToOne(
|
||||
/* istanbul ignore next */
|
||||
() => Group,
|
||||
/* istanbul ignore next */
|
||||
(group) => group.users,
|
||||
/* istanbul ignore next */
|
||||
{ onDelete: 'CASCADE' },
|
||||
)
|
||||
@JoinColumn(
|
||||
/* istanbul ignore next */
|
||||
{ name: 'group_uuid' },
|
||||
)
|
||||
declare group: Promise<Group>
|
||||
}
|
||||
|
||||
@@ -194,7 +194,12 @@ export class User {
|
||||
)
|
||||
declare analyticsEntity: Promise<AnalyticsEntity>
|
||||
|
||||
@OneToMany(() => GroupUser, (groupUser) => groupUser.user)
|
||||
@OneToMany(
|
||||
/* istanbul ignore next */
|
||||
() => GroupUser,
|
||||
/* istanbul ignore next */
|
||||
(groupUser) => groupUser.user,
|
||||
)
|
||||
declare groups: Promise<Group[]>
|
||||
|
||||
supportsSessions(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user