Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Optimise code readabillity
Browse files Browse the repository at this point in the history
The code readability has been improved.
  • Loading branch information
schettn committed Sep 7, 2020
1 parent 9ef1964 commit dbdad74
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/utils/snek/person/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,18 +412,19 @@ const getInstagramPosts = async (runnerOptions: { personName: string }) => {
(profile) => profile.isActive && profile.sourceType == "INSTAGRAM"
)
.map(async (profile) => {
return {
...(
await InstagramProvider.processSource(profile.sourceUrl, {
authorization: profile.accessToken,
})
).map((res) => {
return {
profileId: profile.id,
...res,
};
}),
};
const posts = await InstagramProvider.processSource(
profile.sourceUrl,
{
authorization: profile.accessToken,
}
);

return posts.map((res) => {
return {
profileId: profile.id,
...res,
};
});
})
)
).flat();
Expand Down

0 comments on commit dbdad74

Please sign in to comment.