- Added tunnel
- Removed cloud feature
This commit is contained in:
decolua
2026-02-21 16:42:46 +07:00
parent adf57aa0c9
commit 0baa299722
37 changed files with 858 additions and 933 deletions

View File

@@ -1,7 +1,5 @@
import { NextResponse } from "next/server";
import { getModelAliases, setModelAlias, deleteModelAlias, isCloudEnabled } from "@/models";
import { getConsistentMachineId } from "@/shared/utils/machineId";
import { syncToCloud } from "@/app/api/sync/cloud/route";
import { getModelAliases, setModelAlias, deleteModelAlias } from "@/models";
// GET /api/models/alias - Get all aliases
export async function GET() {
@@ -25,7 +23,6 @@ export async function PUT(request) {
}
await setModelAlias(alias, model);
await syncToCloudIfEnabled();
return NextResponse.json({ success: true, model, alias });
} catch (error) {
@@ -45,7 +42,6 @@ export async function DELETE(request) {
}
await deleteModelAlias(alias);
await syncToCloudIfEnabled();
return NextResponse.json({ success: true });
} catch (error) {
@@ -53,15 +49,3 @@ export async function DELETE(request) {
return NextResponse.json({ error: "Failed to delete alias" }, { status: 500 });
}
}
async function syncToCloudIfEnabled() {
try {
const cloudEnabled = await isCloudEnabled();
if (!cloudEnabled) return;
const machineId = await getConsistentMachineId();
await syncToCloud(machineId);
} catch (error) {
console.log("Error syncing aliases to cloud:", error);
}
}