This commit is contained in:
syuilo 2025-09-24 10:33:14 +09:00
parent ee5b9ba1a9
commit 182d147156
2 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,7 @@ export const paramDef = {
}, },
required: ['choices'], required: ['choices'],
}, },
scheduledAt: { type: 'integer', nullable: true },
}, },
required: [], required: [],
} as const; } as const;
@ -212,6 +213,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
visibility: ps.visibility, visibility: ps.visibility,
visibleUserIds: ps.visibleUserIds ?? [], visibleUserIds: ps.visibleUserIds ?? [],
channelId: ps.channelId ?? undefined, channelId: ps.channelId ?? undefined,
scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null,
}).catch((err) => { }).catch((err) => {
if (err instanceof IdentifiableError) { if (err instanceof IdentifiableError) {
switch (err.id) { switch (err.id) {

View File

@ -215,6 +215,7 @@ export const paramDef = {
}, },
required: ['choices'], required: ['choices'],
}, },
scheduledAt: { type: 'integer', nullable: true },
}, },
required: ['draftId'], required: ['draftId'],
} as const; } as const;
@ -244,6 +245,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
visibility: ps.visibility, visibility: ps.visibility,
visibleUserIds: ps.visibleUserIds ?? [], visibleUserIds: ps.visibleUserIds ?? [],
channelId: ps.channelId ?? undefined, channelId: ps.channelId ?? undefined,
scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null,
}).catch((err) => { }).catch((err) => {
if (err instanceof IdentifiableError) { if (err instanceof IdentifiableError) {
switch (err.id) { switch (err.id) {