mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-07 10:23:24 +08:00
Refine project structure
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { HTTP } from './open-api';
|
||||
|
||||
// get proxy flag according to its name
|
||||
export function getFlag(name) {
|
||||
// flags from @KOP-XIAO: https://github.com/KOP-XIAO/QuantumultX/blob/master/Scripts/resource-parser.js
|
||||
@@ -307,13 +305,3 @@ export function getFlag(name) {
|
||||
) || [])[0];
|
||||
return oldFlag || '🏴☠️';
|
||||
}
|
||||
|
||||
// util API
|
||||
export 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user