misc_pterodactyl-panel/resources/scripts/api/admin/getVersion.ts

23 lines
425 B
TypeScript
Raw Normal View History

import http from '@/api/http';
export interface VersionData {
panel: {
current: string;
latest: string;
2021-07-13 21:58:44 +00:00
}
wings: {
latest: string;
2021-07-13 21:58:44 +00:00
}
git: string | null;
}
export default (): Promise<VersionData> => {
return new Promise((resolve, reject) => {
http.get('/api/application/version')
.then(({ data }) => resolve(data))
.catch(reject);
});
};