chore: removed axios (#7685)

* chore: removed axios

* chore: pnpm
This commit is contained in:
SamTV12345 2026-05-06 22:06:04 +02:00 committed by GitHub
parent 6c7598d88b
commit bfdbd2bb91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 164 additions and 176 deletions

View file

@ -1,7 +1,6 @@
'use strict';
import semver from 'semver';
import settings, {getEpVersion} from './Settings';
import axios from 'axios';
const headers = {
'User-Agent': 'Etherpad/' + getEpVersion(),
}
@ -20,9 +19,10 @@ const loadEtherpadInformations = () => {
return infos;
}
return axios.get(`${settings.updateServer}/info.json`, {headers: headers})
.then(async (resp: any) => {
infos = await resp.data;
return fetch(`${settings.updateServer}/info.json`, {headers})
.then(async (resp) => {
if (!resp.ok) throw new Error(`HTTP ${resp.status} ${resp.statusText}`);
infos = await resp.json() as Infos;
if (infos === undefined || infos === null) {
await Promise.reject("Could not retrieve current version")
return