トランザクションを使用してアンケートレコードの挿入に失敗した場合に投稿レコードの挿入もなかったことにするように
This commit is contained in:
parent
2b6389b4dc
commit
4198246351
3 changed files with 40 additions and 16 deletions
|
@ -214,6 +214,14 @@ export class Note {
|
|||
})
|
||||
public renoteUserHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<Note>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
(this as any)[k] = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type IMentionedRemoteUsers = {
|
||||
|
|
|
@ -53,6 +53,14 @@ export class Poll {
|
|||
})
|
||||
public userHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<Poll>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
(this as any)[k] = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type IPoll = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue