idのとこにscheduledAtから生成したidを入れた
Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
This commit is contained in:
parent
380c8c3283
commit
29e2f886aa
|
@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js';
|
||||||
import type { ScheduledNotesRepository } from '@/models/_.js';
|
import type { ScheduledNotesRepository } from '@/models/_.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { QueryService } from '@/core/QueryService.js';
|
import { QueryService } from '@/core/QueryService.js';
|
||||||
|
import { IdService } from '@/core/IdService.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['notes'],
|
tags: ['notes'],
|
||||||
|
@ -73,6 +74,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
@Inject(DI.scheduledNotesRepository)
|
@Inject(DI.scheduledNotesRepository)
|
||||||
private scheduledNotesRepository: ScheduledNotesRepository,
|
private scheduledNotesRepository: ScheduledNotesRepository,
|
||||||
|
|
||||||
|
private idService: IdService,
|
||||||
private userEntityService: UserEntityService,
|
private userEntityService: UserEntityService,
|
||||||
private queryService: QueryService,
|
private queryService: QueryService,
|
||||||
) {
|
) {
|
||||||
|
@ -107,7 +109,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
createdAt: new Date(item.scheduledAt),
|
createdAt: new Date(item.scheduledAt),
|
||||||
isSchedule: true,
|
isSchedule: true,
|
||||||
// ↓TODO: NoteのIDに予約投稿IDを入れたくない(本来別ものなため)
|
// ↓TODO: NoteのIDに予約投稿IDを入れたくない(本来別ものなため)
|
||||||
id: item.id,
|
id: this.idService.gen(item.scheduledAt.getTime()),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue