Files
immich/web/src/lib/utils/get-github-version.ts
Michel Heusschen 243c98a02e feat(web): re-add version announcement (#1887)
* feat(web): re-add version announcement

* show notification for every update
2023-02-27 17:13:39 -06:00

19 lines
358 B
TypeScript

import axios from 'axios';
type GithubRelease = {
tag_name: string;
};
export const getGithubVersion = async (): Promise<string> => {
const { data } = await axios.get<GithubRelease>(
'https://api.github.com/repos/immich-app/immich/releases/latest',
{
headers: {
Accept: 'application/vnd.github.v3+json'
}
}
);
return data.tag_name;
};