♻️ Refactor backend
This commit is contained in:
1 parent
3666492e90
commit
568bfb9782
5 files changed
+74
-70
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user