diff --git a/app/api/config.ts b/app/api/config.ts index 934b0f1..8c340c0 100644 --- a/app/api/config.ts +++ b/app/api/config.ts @@ -1,3 +1,5 @@ +export const CURRENT_APP_VERSION = "3.1.1"; + export const API_URL = "https://api.anixart.tv"; export const API_PREFIX = "/api"; export const USER_AGENT = diff --git a/app/api/version/route.ts b/app/api/version/route.ts index 945dd31..280b713 100644 --- a/app/api/version/route.ts +++ b/app/api/version/route.ts @@ -1,11 +1,12 @@ import { NextResponse } from "next/server"; import * as fs from "node:fs"; import * as path from "node:path"; +import { CURRENT_APP_VERSION } from "../config"; export async function GET() { const directoryPath = path.join(process.cwd(), "public/changelog"); const files = fs.readdirSync(directoryPath); - const current = "3.1.0"; + const current = CURRENT_APP_VERSION; const previous = []; files.forEach((file) => { if (file != `${current}.md`) {