This commit is contained in:
Michel Roegl-Brunner 2025-03-17 14:43:31 +01:00
parent 3083dcada5
commit 354e385da7
2 changed files with 10 additions and 3 deletions

View File

@ -207,6 +207,10 @@
"name": "toniebox-reverse-engineering/teddycloud",
"version": "tc_v0.6.4"
},
{
"name": "calibre-web-automatedcalibre-webautomated",
"version": "1.0"
},
{
"name": "firefly-iii/firefly-iii",
"version": "develop-20250222.4"

View File

@ -11,8 +11,6 @@ const encoding = "utf-8";
const getVersions = async () => {
const filePath = path.resolve(jsonDir, versionsFileName);
console.log("TEST");
console.log("FilePath: ", filePath);
const fileContent = await fs.readFile(filePath, encoding);
const versions: AppVersion = JSON.parse(fileContent);
return versions;
@ -40,9 +38,14 @@ export async function GET(request: Request) {
}
);
console.log("Matched Version: ", matchedVersion);
if (!matchedVersion) {
return NextResponse.json({name: "No version found", version: "No Version found"});
}
return NextResponse.json(matchedVersion);
} catch (error) {
console.error(error);
return NextResponse.json({name: "name", version: "No version found"});
return NextResponse.json({name: "error", version: "No version found - Error"});
}
}