File size: 490 Bytes
47eb5bf
a874265
47eb5bf
 
 
 
a874265
 
 
 
47eb5bf
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { NextRequest } from "next/server";
import { getIP } from "../../auth";

export async function POST(req: NextRequest) {
  try {
    let res=await fetch("https://eladmin.dwzynj.top/auth/code", {
      method: "GET",
      headers:{
        "UserIp": String(getIP(req))
      }
    })
    let msg=await res.json()
    // console.log(msg)
    return new Response(JSON.stringify(msg))
  } catch (e) {
    console.error("[eladmin] ", e);
    return new Response(JSON.stringify(e));
  }
}