mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
feat: add round-robin routing strategy
Implements a round-robin (least recently used) account selection strategy alongside the existing fill-first priority system. Adds a toggle in the Profile dashboard to switch between strategies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
decolua
co-authored by
Claude Sonnet 4.5
parent
9c3d6f4ad8
commit
9ebd7d3062
@@ -1,5 +1,5 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getSettings } from "@/lib/localDb";
|
||||
import { getSettings, updateSettings } from "@/lib/localDb";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
@@ -10,3 +10,14 @@ export async function GET() {
|
||||
return NextResponse.json({ error: error.message }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
export async function PATCH(request) {
|
||||
try {
|
||||
const body = await request.json();
|
||||
const settings = await updateSettings(body);
|
||||
return NextResponse.json(settings);
|
||||
} catch (error) {
|
||||
console.log("Error updating settings:", error);
|
||||
return NextResponse.json({ error: error.message }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user