mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Update and add server version
This commit is contained in:
@@ -189,7 +189,7 @@ export async function getTraefikConfig(
|
||||
);
|
||||
|
||||
if (!validation.isValid) {
|
||||
logger.error(
|
||||
logger.debug(
|
||||
`Invalid path rewrite configuration for resource ${resourceId}: ${validation.error}`
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
import { verifyPassword } from "@server/auth/password";
|
||||
import logger from "@server/logger";
|
||||
import config from "@server/lib/config";
|
||||
import { APP_VERSION } from "@server/lib/consts";
|
||||
|
||||
export const newtGetTokenBodySchema = z.object({
|
||||
newtId: z.string(),
|
||||
@@ -94,9 +95,10 @@ export async function getNewtToken(
|
||||
const resToken = generateSessionToken();
|
||||
await createNewtSession(resToken, existingNewt.newtId);
|
||||
|
||||
return response<{ token: string }>(res, {
|
||||
return response<{ token: string; serverVersion: string }>(res, {
|
||||
data: {
|
||||
token: resToken
|
||||
token: resToken,
|
||||
serverVersion: APP_VERSION
|
||||
},
|
||||
success: true,
|
||||
error: false,
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
import { verifyPassword } from "@server/auth/password";
|
||||
import logger from "@server/logger";
|
||||
import config from "@server/lib/config";
|
||||
import { APP_VERSION } from "@server/lib/consts";
|
||||
|
||||
export const olmGetTokenBodySchema = z.object({
|
||||
olmId: z.string(),
|
||||
@@ -205,10 +206,12 @@ export async function getOlmToken(
|
||||
return response<{
|
||||
token: string;
|
||||
exitNodes: { publicKey: string; endpoint: string }[];
|
||||
serverVersion: string;
|
||||
}>(res, {
|
||||
data: {
|
||||
token: resToken,
|
||||
exitNodes: exitNodesHpData
|
||||
exitNodes: exitNodesHpData,
|
||||
serverVersion: APP_VERSION
|
||||
},
|
||||
success: true,
|
||||
error: false,
|
||||
|
||||
Reference in New Issue
Block a user