mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +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) => {
|
||||
let userData = {};
|
||||
let credentials = {};
|
||||
db.doc(`/users/${req.user.handle}`)
|
||||
.get()
|
||||
.then((doc) => {
|
||||
if (doc.exists) {
|
||||
userData.credentials = doc.data();
|
||||
return res.status(200).json({userData});
|
||||
credentials = doc.data();
|
||||
return res.status(200).json({credentials});
|
||||
} else {
|
||||
return res.status(400).json({error: "User not found."})
|
||||
}})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user