Skip to content

Commit

Permalink
fix(backedn): visibilityが下書きに反映されない
Browse files Browse the repository at this point in the history
  • Loading branch information
tai-cha committed Jan 16, 2025
1 parent 0884aee commit fb03e78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/backend/src/core/NoteDraftService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class NoteDraftService {

const draft = await this.noteDraftsRepository.insertOne({
id: this.idService.gen(),
visibility: data.visibility,
fileIds: data.files ? data.files.map(file => file.id) : [],
replyId: data.reply ? data.reply.id : null,
renoteId: data.renote ? data.renote.id : null,
Expand Down Expand Up @@ -109,6 +110,8 @@ export class NoteDraftService {
}

await this.noteDraftsRepository.update(draft.id, {
visibility: data.visibility,
cw: data.cw,
fileIds: data.files ? data.files.map(file => file.id) : [],
replyId: data.reply ? data.reply.id : null,
renoteId: data.renote ? data.renote.id : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-

await this.noteDraftService.delete(me, draft.id);

return {};
return { message: 'success' };
});
}
}

0 comments on commit fb03e78

Please sign in to comment.