feat(web): re-add version announcement (#1887)

* feat(web): re-add version announcement

* show notification for every update
This commit is contained in:
Michel Heusschen
2023-02-28 00:13:39 +01:00
committed by GitHub
parent c9a6820de7
commit 243c98a02e
6 changed files with 112 additions and 116 deletions

View File

@@ -0,0 +1,18 @@
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;
};