mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 09:23:51 +00:00
refactor: use strict typing
This commit is contained in:
committed by
Carlos Valente
parent
4ed38340e0
commit
178640bfc4
@@ -4,7 +4,7 @@ import { getDataProvider } from '../../classes/data-provider/DataProvider.js';
|
||||
import { publicDir } from '../../setup/index.js';
|
||||
import { socket } from '../../adapters/WebsocketAdapter.js';
|
||||
import { getLastRequest } from '../../api-integration/integration.controller.js';
|
||||
import { getLastLoadedProject } from '../../services/app-state-service/AppStateService.js';
|
||||
import { getCurrentProject } from '../../services/project-service/ProjectService.js';
|
||||
import { runtimeService } from '../../services/runtime-service/RuntimeService.js';
|
||||
import { getNetworkInterfaces } from '../../utils/network.js';
|
||||
import { getTimezoneLabel } from '../../utils/time.js';
|
||||
@@ -17,7 +17,7 @@ const startedAt = new Date();
|
||||
export async function getSessionStats(): Promise<SessionStats> {
|
||||
const { connectedClients, lastConnection } = socket.getStats();
|
||||
const lastRequest = getLastRequest();
|
||||
const projectName = await getLastLoadedProject();
|
||||
const { filename } = await getCurrentProject();
|
||||
const { playback } = runtimeService.getRuntimeState();
|
||||
|
||||
return {
|
||||
@@ -25,7 +25,7 @@ export async function getSessionStats(): Promise<SessionStats> {
|
||||
connectedClients,
|
||||
lastConnection: lastConnection !== null ? lastConnection.toISOString() : null,
|
||||
lastRequest: lastRequest !== null ? lastRequest.toISOString() : null,
|
||||
projectName,
|
||||
projectName: filename,
|
||||
playback,
|
||||
timezone: getTimezoneLabel(startedAt),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user