mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
refactor: add version to session endpoint
This commit is contained in:
committed by
Carlos Valente
parent
08d9e24871
commit
cd40a6e55e
@@ -10,6 +10,7 @@ import { getNetworkInterfaces } from '../../utils/network.js';
|
|||||||
import { getTimezoneLabel } from '../../utils/time.js';
|
import { getTimezoneLabel } from '../../utils/time.js';
|
||||||
import { password, routerPrefix } from '../../externals.js';
|
import { password, routerPrefix } from '../../externals.js';
|
||||||
import { hashPassword } from '../../utils/hash.js';
|
import { hashPassword } from '../../utils/hash.js';
|
||||||
|
import { ONTIME_VERSION } from '../../ONTIME_VERSION.js';
|
||||||
|
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ export async function getSessionStats(): Promise<SessionStats> {
|
|||||||
projectName: filename,
|
projectName: filename,
|
||||||
playback,
|
playback,
|
||||||
timezone: getTimezoneLabel(startedAt),
|
timezone: getTimezoneLabel(startedAt),
|
||||||
|
version: ONTIME_VERSION,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export interface SessionStats {
|
|||||||
projectName: string;
|
projectName: string;
|
||||||
playback: Playback;
|
playback: Playback;
|
||||||
timezone: string;
|
timezone: string;
|
||||||
|
version: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetInfo {
|
export interface GetInfo {
|
||||||
|
|||||||
Reference in New Issue
Block a user