♻️ Refactor backend

This commit is contained in:
2022-11-16 19:03:32 +01:00
parent 3666492e90
commit 568bfb9782
5 changed files with 74 additions and 70 deletions

View File

@ -5,7 +5,7 @@ export async function getAuthtoken(username, password) {
const response = await axios.get(
`${baseUrl}/authid?user=${username}&password=${password}&bundleid&appversion&osversion&pushid`
);
if (response.data == "") throw "Wrong username or password";
if (response.data == "") throw "Wrong DSB username or password";
return response.data;
}

View File

@ -28,9 +28,9 @@ export class Parser {
const plans = [];
for (const entry of data) {
// Download the substitution plan
const data = await this.fetchFile(entry.url);
const file = await this.fetchFile(entry.url);
// Parse the substitution plan
const parsed = parseSubstitutionPlan(data);
const parsed = parseSubstitutionPlan(file);
plans.push(parsed);
}
// Create a new parse event