Alova 3 now working

This commit is contained in:
proddy
2024-08-10 11:39:31 +02:00
parent bb98042957
commit a718f8ed0d
31 changed files with 117 additions and 409 deletions

View File

@@ -24,29 +24,15 @@ export const fetchLog = () => alovaInstance.Post('/rest/fetchLog');
export const fetchLogES = () => alovaInstance.Get('/es/log');
// Get versions from github
// Alova 3 code...
// export const getStableVersion = () =>
// alovaInstanceGH.Get('latest', {
// transform(response: { data: { name: string } }) {
// return response.data.name.substring(1);
// }
// });
// export const getDevVersion = () =>
// alovaInstanceGH.Get('tags/latest', {
// transform(response: { data: { name: string } }) {
// return response.data.name.split(/\s+/).splice(-1)[0].substring(1);
// }
// });
export const getStableVersion = () =>
alovaInstanceGH.Get('latest', {
transformData(response: { data: { name: string } }) {
transform(response: { data: { name: string } }) {
return response.data.name.substring(1);
}
});
export const getDevVersion = () =>
alovaInstanceGH.Get('tags/latest', {
transformData(response: { data: { name: string } }) {
transform(response: { data: { name: string } }) {
return response.data.name.split(/\s+/).splice(-1)[0].substring(1);
}
});