TL bug fix

This commit is contained in:
mattyatea 2023-10-09 22:32:56 +09:00
parent 281e4100a7
commit 838a624655
2 changed files with 2 additions and 5 deletions

View File

@ -74,9 +74,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private redisTimelineService: RedisTimelineService, private redisTimelineService: RedisTimelineService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.genId(new Date(ps.untilDate!)) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.genId(new Date(ps.sinceDate!)) : null);
const policies = await this.roleService.getUserPolicies(me ? me.id : null); const policies = await this.roleService.getUserPolicies(me ? me.id : null);
if (!policies.ltlAvailable) { if (!policies.ltlAvailable) {
throw new ApiError(meta.errors.ltlDisabled); throw new ApiError(meta.errors.ltlDisabled);

View File

@ -67,8 +67,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private redisTimelineService: RedisTimelineService, private redisTimelineService: RedisTimelineService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.genId(new Date(ps.untilDate!)) : null); const untilId = ps.untilId ?? ps.untilDate ? this.idService.genId(new Date(ps.untilDate!)) : null;
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.genId(new Date(ps.sinceDate!)) : null); const sinceId = ps.sinceId ?? ps.sinceDate ? this.idService.genId(new Date(ps.sinceDate!)) : null;
const [ const [
followings, followings,