api(application): add 'version' endpoint

This commit is contained in:
Matthew Penner 2021-01-07 09:32:04 -07:00
parent 545cc3bbd2
commit 12c68961db
5 changed files with 147 additions and 75 deletions

View 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);
});
};