@@ -590,11 +590,3 @@ const getResponseDetails = async (req, res) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { ask, suggestions, getThreadDetails, getResponseDetails };
|
module.exports = { ask, suggestions, getThreadDetails, getResponseDetails };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ const loginUser = async (req, res) => {
|
|||||||
if (!username || !password) {
|
if (!username || !password) {
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
success: false,
|
success: false,
|
||||||
message: "Username and password are required"
|
message: "Username and password are required",
|
||||||
|
token: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +32,8 @@ const loginUser = async (req, res) => {
|
|||||||
if (rows.length === 0) {
|
if (rows.length === 0) {
|
||||||
return res.status(401).json({
|
return res.status(401).json({
|
||||||
success: false,
|
success: false,
|
||||||
message: "Invalid username or password"
|
message: "Invalid username or password",
|
||||||
|
token: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user