mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-04 07:26:29 +09:00
refactor: rename instance.caughtAt to instance.firstRetrievedAt
This commit is contained in:
@ -34,7 +34,7 @@ export class FederatedInstanceService {
|
||||
const i = await this.instancesRepository.insert({
|
||||
id: this.idService.genId(),
|
||||
host,
|
||||
caughtAt: new Date(),
|
||||
firstRetrievedAt: new Date(),
|
||||
}).then(x => this.instancesRepository.findOneByOrFail(x.identifiers[0]));
|
||||
|
||||
this.cache.set(host, i);
|
||||
|
@ -29,7 +29,7 @@ export class InstanceEntityService {
|
||||
const meta = await this.metaService.fetch();
|
||||
return {
|
||||
id: instance.id,
|
||||
caughtAt: instance.caughtAt.toISOString(),
|
||||
firstRetrievedAt: instance.firstRetrievedAt.toISOString(),
|
||||
host: instance.host,
|
||||
usersCount: instance.usersCount,
|
||||
notesCount: instance.notesCount,
|
||||
|
@ -13,7 +13,7 @@ export class Instance {
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The caught date of the Instance.',
|
||||
})
|
||||
public caughtAt: Date;
|
||||
public firstRetrievedAt: Date;
|
||||
|
||||
/**
|
||||
* ホスト
|
||||
|
@ -6,7 +6,7 @@ export const packedFederationInstanceSchema = {
|
||||
optional: false, nullable: false,
|
||||
format: 'id',
|
||||
},
|
||||
caughtAt: {
|
||||
firstRetrievedAt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
format: 'date-time',
|
||||
|
@ -63,8 +63,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
case '-following': query.orderBy('instance.followingCount', 'ASC'); break;
|
||||
case '+followers': query.orderBy('instance.followersCount', 'DESC'); break;
|
||||
case '-followers': query.orderBy('instance.followersCount', 'ASC'); break;
|
||||
case '+caughtAt': query.orderBy('instance.caughtAt', 'DESC'); break;
|
||||
case '-caughtAt': query.orderBy('instance.caughtAt', 'ASC'); break;
|
||||
case '+firstRetrievedAt': query.orderBy('instance.firstRetrievedAt', 'DESC'); break;
|
||||
case '-firstRetrievedAt': query.orderBy('instance.firstRetrievedAt', 'ASC'); break;
|
||||
case '+latestRequestReceivedAt': query.orderBy('instance.latestRequestReceivedAt', 'DESC', 'NULLS LAST'); break;
|
||||
case '-latestRequestReceivedAt': query.orderBy('instance.latestRequestReceivedAt', 'ASC', 'NULLS FIRST'); break;
|
||||
|
||||
|
Reference in New Issue
Block a user