mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
@@ -1,18 +1,15 @@
|
||||
import axios from 'axios';
|
||||
|
||||
type GithubRelease = {
|
||||
tag_name: string;
|
||||
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'
|
||||
}
|
||||
}
|
||||
);
|
||||
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;
|
||||
return data.tag_name;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user