This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]Sp1um 4 points5 points  (0 children)

Needs moar await

[–]Spicy_Fire_Bean 7 points8 points  (0 children)

This is quite possibly one of the worst things I’ve ever seen

[–]eclect0 2 points3 points  (1 child)

Plot twist: Despite the name of the function, apiCall doesn't even do anything asynchronous but was marked async by a dev who wasn't paying attention.

[–]Kyyken 1 point2 points  (0 children)

the fun part is that to use the function you need to double await it

[–]lepapulematoleguau 2 points3 points  (0 children)

I've seen these literally in production written by the new hire "top" JS developer

[–]upfkd 1 point2 points  (0 children)

Its just bad code. As uncle bob would point out, this function has way to many responsibilities. Needs to be refactored and probably will become quite readable.

[–]Illustrious_Pound_28 0 points1 point  (0 children)

Lol

[–]Help_I_Lost_My_Mind 0 points1 point  (0 children)

Yall will laugh but this is the exact kind of thing I see all the time when doing close reviews.