mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 17:23:54 +09:00
startAt -> startsAt
This commit is contained in:
@ -22,7 +22,7 @@ export class Ad {
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The expired date of the Ad.',
|
||||
})
|
||||
public startAt: Date;
|
||||
public startsAt: Date;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 32, nullable: false,
|
||||
|
@ -20,10 +20,10 @@ export const paramDef = {
|
||||
priority: { type: 'string' },
|
||||
ratio: { type: 'integer' },
|
||||
expiresAt: { type: 'integer' },
|
||||
startAt: { type: 'integer' },
|
||||
startsAt: { type: 'integer' },
|
||||
imageUrl: { type: 'string', minLength: 1 },
|
||||
},
|
||||
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'startAt', 'imageUrl'],
|
||||
required: ['url', 'memo', 'place', 'priority', 'ratio', 'expiresAt', 'startsAt', 'imageUrl'],
|
||||
} as const;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@ -40,7 +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),
|
||||
startsAt: new Date(ps.startsAt),
|
||||
url: ps.url,
|
||||
imageUrl: ps.imageUrl,
|
||||
priority: ps.priority,
|
||||
|
@ -30,9 +30,9 @@ export const paramDef = {
|
||||
priority: { type: 'string' },
|
||||
ratio: { type: 'integer' },
|
||||
expiresAt: { type: 'integer' },
|
||||
startAt: { type: 'integer' },
|
||||
startsAt: { type: 'integer' },
|
||||
},
|
||||
required: ['id', 'memo', 'url', 'imageUrl', 'place', 'priority', 'ratio', 'expiresAt', 'startAt'],
|
||||
required: ['id', 'memo', 'url', 'imageUrl', 'place', 'priority', 'ratio', 'expiresAt', 'startsAt'],
|
||||
} as const;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@ -55,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
memo: ps.memo,
|
||||
imageUrl: ps.imageUrl,
|
||||
expiresAt: new Date(ps.expiresAt),
|
||||
startAt: new Date(ps.startAt),
|
||||
startsAt: new Date(ps.startsAt),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
const ads = await this.adsRepository.find({
|
||||
where: {
|
||||
expiresAt: MoreThan(new Date()),
|
||||
startAt: LessThanOrEqual(new Date()),
|
||||
startsAt: LessThanOrEqual(new Date()),
|
||||
},
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user