chore: do new design mockup
This commit is contained in:
17
src/lib/api/ezpp.ts
Normal file
17
src/lib/api/ezpp.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import ky from 'ky';
|
||||
|
||||
const BANCHO_ENDPOINT = 'https://c.ez-pp.farm/';
|
||||
|
||||
export const ezppfarm = {
|
||||
ping: async (): Promise<number | undefined> => {
|
||||
try {
|
||||
const start = Date.now();
|
||||
const request = await ky(BANCHO_ENDPOINT);
|
||||
if (!request.ok) return undefined;
|
||||
const ping = Date.now() - start;
|
||||
return ping;
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user