mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 18:33:46 +02:00
api(application): add 'version' endpoint
This commit is contained in:
22
resources/scripts/api/admin/getVersion.ts
Normal file
22
resources/scripts/api/admin/getVersion.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import http from '@/api/http';
|
||||
|
||||
export interface VersionData {
|
||||
panel: {
|
||||
current: string;
|
||||
latest: string;
|
||||
};
|
||||
|
||||
wings: {
|
||||
latest: string;
|
||||
};
|
||||
|
||||
git: string | null;
|
||||
}
|
||||
|
||||
export default (): Promise<VersionData> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get('/api/application/version')
|
||||
.then(({ data }) => resolve(data))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user