|
@@ -94,12 +94,18 @@ const getCurrent = async (req, res, next) => {
|
|
data: 'UNAUTHORIZED',
|
|
data: 'UNAUTHORIZED',
|
|
message: 'Invalid credentials',
|
|
message: 'Invalid credentials',
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ const { name, lastName, country, number, token, avatarUrl: url } = user;
|
|
|
|
+ const avatarUrl = `localhost:3000/${url}`;
|
|
return res.status(200).json({
|
|
return res.status(200).json({
|
|
status: 'success',
|
|
status: 'success',
|
|
code: 200,
|
|
code: 200,
|
|
data: {
|
|
data: {
|
|
- user,
|
|
|
|
|
|
+ name,
|
|
|
|
+ lastName,
|
|
|
|
+ country,
|
|
|
|
+ number,
|
|
|
|
+ token,
|
|
|
|
+ avatarUrl,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
} catch (e) {
|
|
} catch (e) {
|