diff --git a/controllers/auth.js b/controllers/auth.js index 3df72fd..d94230d 100644 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -48,7 +48,7 @@ const callback = async (req, res) => { // check state if (state === null || state !== storedState) { - res.redirect(409, "/"); + res.status(409).send({ message: "Invalid state" }); logger.warn("state mismatch"); return; } else if (error) { diff --git a/controllers/operations.js b/controllers/operations.js index 4939346..dd451fa 100644 --- a/controllers/operations.js +++ b/controllers/operations.js @@ -519,7 +519,7 @@ const populateSingleLink = async (req, res) => { const { toAddNum, localNum } = result; let logMsg; logMsg = toAddNum > 0 ? "Added " + toAddNum + " tracks" : "No tracks to add"; - logMsg += localNum > 0 ? ", but could not add " + localNum + " local files" : "."; + logMsg += localNum > 0 ? "; could not process " + localNum + " local files" : "."; res.status(200).send({ message: logMsg }); logger.debug(logMsg, { toAddNum, localNum });