mirror of
https://github.com/RomySaputraSihananda/ares.git
synced 2026-08-16 04:08:08 +00:00
14 lines
332 B
TypeScript
14 lines
332 B
TypeScript
import { NextResponse } from "next/server";
|
|||
|
|
import { getPositions } from "@/lib/mt5";
|
||
|
|
|
||
|
|
export const dynamic = "force-dynamic";
|
||
|
|
|
||
|
|
export async function GET() {
|
||
|
|
try {
|
||
|
|
const data = await getPositions();
|
||
|
|
return NextResponse.json(data);
|
||
|
|
} catch (e) {
|
||
|
|
return NextResponse.json({ error: String(e) }, { status: 502 });
|
||
|
|
}
|
||
|
|
}
|