fix == and != to === and !==, add check to eslint
This commit is contained in:
1 parent
132e25b7f2
commit
13ef5fce09
6 files changed
+16
-15
No files matched your search
@@ -21,7 +21,7 @@ router.get("/:groupname", async (req, res) => {
|
||||
|
||||
// attempt to parse group from groupname
|
||||
const groupObj = global.utils.getGroupObjFromGroupname(params.groupname);
|
||||
if (groupObj == null) {
|
||||
if (groupObj === null) {
|
||||
res.status(400).send({ auth: true, error:`Groupname ${params.groupname} does not match format gid-realm or gid.` });
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ router.get("/:username", async (req, res) => {
|
||||
|
||||
// attempt to parse user from username
|
||||
const userObj = global.utils.getUserObjFromUsername(params.username);
|
||||
if (userObj == null) {
|
||||
if (userObj === null) {
|
||||
res.status(400).send({ auth:true, error:`username ${params.username} does not match format uid@realm.` });
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ router.post("/:disk/resize", async (req, res) => {
|
||||
|
||||
// attempt to parse user from username
|
||||
const userObj = global.utils.getUserObjFromUsername(req.cookies.username);
|
||||
if (userObj == null) {
|
||||
if (userObj === null) {
|
||||
res.status(400).send({ auth:true, error:`username ${req.cookies.username} does not match format uid@realm.` });
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ router.post("/:disk/move", async (req, res) => {
|
||||
|
||||
// attempt to parse user from username
|
||||
const userObj = global.utils.getUserObjFromUsername(req.cookies.username);
|
||||
if (userObj == null) {
|
||||
if (userObj === null) {
|
||||
res.status(400).send({ auth:true, error:`username ${req.cookies.username} does not match format uid@realm.` });
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ router.post("/:disk/create", async (req, res) => {
|
||||
|
||||
// attempt to parse user from username
|
||||
const userObj = global.utils.getUserObjFromUsername(req.cookies.username);
|
||||
if (userObj == null) {
|
||||
if (userObj === null) {
|
||||
res.status(400).send({ auth:true, error:`username ${req.cookies.username} does not match format uid@realm.` });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user