mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 10:18:48 +00:00
Rename variable to make code more concise
This commit is contained in:
parent
b16c3eb50f
commit
64c10cd172
@ -245,13 +245,13 @@ exports.getUserDetails = (req, res) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.getAuthenticatedUser = (req, res) => {
|
exports.getAuthenticatedUser = (req, res) => {
|
||||||
let userData = {};
|
let credentials = {};
|
||||||
db.doc(`/users/${req.user.handle}`)
|
db.doc(`/users/${req.user.handle}`)
|
||||||
.get()
|
.get()
|
||||||
.then((doc) => {
|
.then((doc) => {
|
||||||
if (doc.exists) {
|
if (doc.exists) {
|
||||||
userData.credentials = doc.data();
|
credentials = doc.data();
|
||||||
return res.status(200).json({userData});
|
return res.status(200).json({credentials});
|
||||||
} else {
|
} else {
|
||||||
return res.status(400).json({error: "User not found."})
|
return res.status(400).json({error: "User not found."})
|
||||||
}})
|
}})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user