(enhance) notes/create で予約投稿できるように
This commit is contained in:
parent
1995400dac
commit
2bc15c09ed
9 changed files with 122 additions and 23 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export type EndedPollNotificationJobData = {
|
|||
};
|
||||
|
||||
export type ScheduleNotePostJobData = {
|
||||
scheduleNoteId: MiNote['id'];
|
||||
scheduledNoteId: MiNote['id'];
|
||||
}
|
||||
|
||||
type MinimumUser = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue