feat: add current version to /api/server-config

This commit is contained in:
shinya
2025-08-14 17:48:57 +08:00
parent 965cb13a56
commit f99f0225b3

View File

@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import { NextRequest, NextResponse } from 'next/server';
import { CURRENT_VERSION } from '@/lib/version'
import { getConfig } from '@/lib/config';
@@ -13,6 +14,7 @@ export async function GET(request: NextRequest) {
const result = {
SiteName: config.SiteConfig.SiteName,
StorageType: process.env.NEXT_PUBLIC_STORAGE_TYPE || 'localstorage',
Version: CURRENT_VERSION,
};
return NextResponse.json(result);
}