mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
11 lines
340 B
JavaScript
11 lines
340 B
JavaScript
import { HTTP } from '../vendor/open-api';
|
|
|
|
export default async function IP_API(req, res) {
|
|
const server = decodeURIComponent(req.params.server);
|
|
const $http = HTTP();
|
|
const result = await $http
|
|
.get(`http://ip-api.com/json/${server}?lang=zh-CN`)
|
|
.then((resp) => JSON.parse(resp.body));
|
|
res.json(result);
|
|
}
|