(enhance) notes/create で予約投稿できるように

This commit is contained in:
kakkokari-gtyih 2023-11-09 23:31:16 +09:00
parent 1995400dac
commit 2bc15c09ed
9 changed files with 122 additions and 23 deletions

View file

@ -32,9 +32,9 @@ export class ScheduleNotePostProcessorService {
@bindThis
public async process(job: Bull.Job<ScheduleNotePostJobData>): Promise<void> {
this.scheduledNotesRepository.findOneBy({ id: job.data.scheduleNoteId }).then(async (data) => {
this.scheduledNotesRepository.findOneBy({ id: job.data.scheduledNoteId }).then(async (data) => {
if (!data) {
this.logger.warn(`Schedule note ${job.data.scheduleNoteId} not found`);
this.logger.warn(`Schedule note ${job.data.scheduledNoteId} not found`);
} else {
data.note.createdAt = new Date();
const me = await this.usersRepository.findOneByOrFail({ id: data.userId });

View file

@ -109,7 +109,7 @@ export type EndedPollNotificationJobData = {
};
export type ScheduleNotePostJobData = {
scheduleNoteId: MiNote['id'];
scheduledNoteId: MiNote['id'];
}
type MinimumUser = {