From 315adeb5e2012b7f7bcfcd1478f9d6dd2cc1092d Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Tue, 26 Jun 2018 21:46:41 +0200 Subject: Update code to comply with new styling --- src/server/lib/schools/hetmml/getScheduleData.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/server/lib/schools') diff --git a/src/server/lib/schools/hetmml/getScheduleData.js b/src/server/lib/schools/hetmml/getScheduleData.js index 1d835fb..ead856f 100644 --- a/src/server/lib/schools/hetmml/getScheduleData.js +++ b/src/server/lib/schools/hetmml/getScheduleData.js @@ -128,10 +128,14 @@ function combineUsers(usersArrays) { * @returns {*} [{ type: string, value: string, alt: string, index: number }, ...] */ function getAlts(users) { - const requests = users.map(user => - axios.get(getUrlOfUser('dag', user.type, user.index, 7)), { timeout: 8000 }); - - return Promise.all(requests).then(teacherResponses => + const requests = users.map(user => ( + axios.get( + getUrlOfUser('dag', user.type, user.index, 7), + { timeout: 8000 }, + ) + )); + + return Promise.all(requests).then(teacherResponses => ( teacherResponses.map((teacherResponse, index) => { const teacherName = scrapeAltText(teacherResponse.data); @@ -139,7 +143,8 @@ function getAlts(users) { ...users[index], alt: teacherName, }; - })); + }) + )); } /** -- cgit v1.1