mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-16 07:40:04 +02:00
Store the cli version for display and handle auto update
This commit is contained in:
@@ -48,6 +48,8 @@ type SiteQueryRow = NonNullable<Awaited<ReturnType<typeof query>>>;
|
||||
export type GetSiteResponse = SiteQueryRow["sites"] & {
|
||||
newtId: string | null;
|
||||
newtVersion: string | null;
|
||||
agent: string | null;
|
||||
agentVersion: string | null;
|
||||
countryCode: string | null;
|
||||
};
|
||||
|
||||
@@ -137,6 +139,8 @@ export async function getSite(
|
||||
...site.sites,
|
||||
newtId: site.newt ? site.newt.newtId : null,
|
||||
newtVersion: site.newt?.version ?? null,
|
||||
agent: site.newt?.agent ?? null,
|
||||
agentVersion: site.newt?.agentVersion ?? null,
|
||||
countryCode: site.sites.endpoint
|
||||
? ((await getCountryCodeForIp(site.sites.endpoint)) ?? null)
|
||||
: null
|
||||
|
||||
@@ -133,6 +133,8 @@ function querySitesBase() {
|
||||
online: sites.online,
|
||||
address: sites.address,
|
||||
newtVersion: newts.version,
|
||||
agent: newts.agent,
|
||||
agentVersion: newts.agentVersion,
|
||||
exitNodeId: sites.exitNodeId,
|
||||
exitNodeName: exitNodes.name,
|
||||
exitNodeEndpoint: exitNodes.endpoint,
|
||||
|
||||
Reference in New Issue
Block a user