広告開始時期の設定 (#9944)

* 広告開始時期の設定

* 過去のものも表示するように
This commit is contained in:
nenohi
2023-02-15 14:29:40 +09:00
committed by GitHub
parent 8caf288ac1
commit 71c42bef9b
8 changed files with 36 additions and 8 deletions

View File

@@ -20,9 +20,10 @@ export const paramDef = {
priority: { type: 'string' },
ratio: { type: 'integer' },
expiresAt: { type: 'integer' },
startAt: { type: 'integer' },
imageUrl: { type: 'string', minLength: 1 },
},
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'imageUrl'],
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'startAt', 'imageUrl'],
} as const;
// eslint-disable-next-line import/no-default-export
@@ -39,6 +40,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
id: this.idService.genId(),
createdAt: new Date(),
expiresAt: new Date(ps.expiresAt),
startAt: new Date(ps.startAt),
url: ps.url,
imageUrl: ps.imageUrl,
priority: ps.priority,