Skip to content

Commit

Permalink
refactor(API): Reorganize code for better reading
Browse files Browse the repository at this point in the history
Closes LL-273
  • Loading branch information
Yevgenii Sharpinskii committed Dec 24, 2019
1 parent f8e07ba commit 53d5f03
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api/src/controllers/ImportPersonasController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@ const uploadPersonas = catchErrors(async (req, res) => {
});

const importPersonas = catchErrors(async (req, res) => {
const authInfo = getAuthFromRequest(req);

const { id } = req.body;

const authInfo = getAuthFromRequest(req);
const personaService = getPersonaService();

const { personaImport } = await importPersonasService({
id,
authInfo,
personaService,
});

return res.status(200).json(personaImport);
res.status(200).json(personaImport);
});

const importPersonasError = catchErrors(async (req, res) => {
Expand Down

0 comments on commit 53d5f03

Please sign in to comment.