diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-07-20 21:33:20 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-07-20 21:33:20 +0900 |
| commit | 337b42bcb179bdfb993888ed94342a0158e8f3cb (patch) | |
| tree | bd40424cf34c72b17effe19e5ce3cf866b3c6241 /packages/backend/src/models/UserKeypair.ts | |
| parent | docs(misskey-js): fix broken i-want-you image link in README.md (#14265) (diff) | |
| download | sharkey-337b42bcb179bdfb993888ed94342a0158e8f3cb.tar.gz sharkey-337b42bcb179bdfb993888ed94342a0158e8f3cb.tar.bz2 sharkey-337b42bcb179bdfb993888ed94342a0158e8f3cb.zip | |
revert 5f88d56d96
バグがある(かつすぐに修正できそうにない) & まだレビュー途中で意図せずマージされたため
Diffstat (limited to 'packages/backend/src/models/UserKeypair.ts')
| -rw-r--r-- | packages/backend/src/models/UserKeypair.ts | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/packages/backend/src/models/UserKeypair.ts b/packages/backend/src/models/UserKeypair.ts index afa74ef11a..f5252d126c 100644 --- a/packages/backend/src/models/UserKeypair.ts +++ b/packages/backend/src/models/UserKeypair.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne } from 'typeorm'; +import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm'; import { id } from './util/id.js'; import { MiUser } from './User.js'; @@ -12,42 +12,22 @@ export class MiUserKeypair { @PrimaryColumn(id()) public userId: MiUser['id']; - @ManyToOne(type => MiUser, { + @OneToOne(type => MiUser, { onDelete: 'CASCADE', }) @JoinColumn() public user: MiUser | null; - /** - * RSA public key - */ @Column('varchar', { length: 4096, }) public publicKey: string; - /** - * RSA private key - */ @Column('varchar', { length: 4096, }) public privateKey: string; - @Column('varchar', { - length: 128, - nullable: true, - default: null, - }) - public ed25519PublicKey: string | null; - - @Column('varchar', { - length: 128, - nullable: true, - default: null, - }) - public ed25519PrivateKey: string | null; - constructor(data: Partial<MiUserKeypair>) { if (data == null) return; |