use TimeService everywhere in the backend

This commit is contained in:
Hazelnoot 2025-10-01 19:11:33 -04:00
parent ed750fd990
commit 6cceca90f9
123 changed files with 550 additions and 285 deletions

View file

@ -5,6 +5,7 @@
import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { TimeService } from '@/core/TimeService.js';
export const meta = {
requireCredential: false,
@ -38,10 +39,11 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
constructor(
private readonly timeService: TimeService,
) {
super(meta, paramDef, async () => {
return {
pong: Date.now(),
pong: this.timeService.now,
};
});
}