admin panel fast follows (#10723)
fast follows: - https://discord.com/channels/1130383047699738754/1346433965451382845 - https://discord.com/channels/1130383047699738754/1346434512757981264 - https://discord.com/channels/1130383047699738754/1346453484911853610 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
export const checkTwentyVersionExists = async (
|
||||
version: string,
|
||||
): Promise<boolean> => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://api.github.com/repos/twentyhq/twenty/releases/tags/v${version}`,
|
||||
);
|
||||
return response.status === 200;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export const fetchLatestTwentyRelease = async (): Promise<string> => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
'https://api.github.com/repos/twentyhq/twenty/releases/latest',
|
||||
);
|
||||
const data = await response.json();
|
||||
return data.tag_name.replace('v', '');
|
||||
} catch (error) {
|
||||
return 'Could not fetch latest release';
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user