mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-08 04:37:30 +08:00
feat: add current version to /api/server-config
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
|
import { CURRENT_VERSION } from '@/lib/version'
|
||||||
|
|
||||||
import { getConfig } from '@/lib/config';
|
import { getConfig } from '@/lib/config';
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ export async function GET(request: NextRequest) {
|
|||||||
const result = {
|
const result = {
|
||||||
SiteName: config.SiteConfig.SiteName,
|
SiteName: config.SiteConfig.SiteName,
|
||||||
StorageType: process.env.NEXT_PUBLIC_STORAGE_TYPE || 'localstorage',
|
StorageType: process.env.NEXT_PUBLIC_STORAGE_TYPE || 'localstorage',
|
||||||
|
Version: CURRENT_VERSION,
|
||||||
};
|
};
|
||||||
return NextResponse.json(result);
|
return NextResponse.json(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user