13.11.0 マージ時のミスを修正
This commit is contained in:
parent
1ed9e440c7
commit
94f5b78b6b
|
@ -6,7 +6,7 @@ import * as crypto from 'node:crypto';
|
||||||
const TIME2000 = 946684800000;
|
const TIME2000 = 946684800000;
|
||||||
let counter = crypto.randomBytes(2).readUInt16LE(0);
|
let counter = crypto.randomBytes(2).readUInt16LE(0);
|
||||||
|
|
||||||
export function getTimeId(time: number): string {
|
function getTime(time: number): string {
|
||||||
time = time - TIME2000;
|
time = time - TIME2000;
|
||||||
if (time < 0) time = 0;
|
if (time < 0) time = 0;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export function genAid(date: Date): string {
|
||||||
const t = date.getTime();
|
const t = date.getTime();
|
||||||
if (isNaN(t)) throw 'Failed to create AID: Invalid Date';
|
if (isNaN(t)) throw 'Failed to create AID: Invalid Date';
|
||||||
counter++;
|
counter++;
|
||||||
return getTimeId(t) + getNoise();
|
return getTime(t) + getNoise();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseAid(id: string): { date: Date; } {
|
export function parseAid(id: string): { date: Date; } {
|
||||||
|
|
|
@ -65,7 +65,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
.where('following.followerId = :followerId', { followerId: me.id })
|
.where('following.followerId = :followerId', { followerId: me.id })
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
const minId = getTimeId(new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)).getTime()) + '00'; // 30日前まで
|
|
||||||
//#region Construct query
|
//#region Construct query
|
||||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
||||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||||
|
|
Loading…
Reference in a new issue