mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
19 lines
358 B
TypeScript
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;
|
|
};
|