- Fixed arrow functions in class error
This commit is contained in:
@@ -167,7 +167,7 @@ class IngredientRepository {
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
isEmptyObject(obj) {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
@@ -176,7 +176,7 @@ class IngredientRepository {
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
isXSSAttempt(string) {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
|
||||
@@ -48,25 +48,6 @@ class MetaSchoolRepository {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = MetaSchoolRepository
|
||||
@@ -168,7 +168,7 @@ class SchoolRepository {
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
isEmptyObject(obj) {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
@@ -177,7 +177,7 @@ class SchoolRepository {
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
isXSSAttempt(string) {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
|
||||
@@ -224,7 +224,7 @@ class SpellRepository {
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
isEmptyObject(obj) {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
@@ -233,7 +233,7 @@ class SpellRepository {
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
isXSSAttempt(string) {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
|
||||
@@ -51,24 +51,6 @@ class UserRepository {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UserRepository
|
||||
@@ -164,7 +164,7 @@ class VariableRepository {
|
||||
}
|
||||
|
||||
// Check if object is null
|
||||
isEmptyObject = (obj) => {
|
||||
isEmptyObject(obj) {
|
||||
if (Object.keys(obj).length === 0 && obj.constructor === Object) {
|
||||
return true
|
||||
} else {
|
||||
@@ -173,7 +173,7 @@ class VariableRepository {
|
||||
}
|
||||
|
||||
// Check if script injection attempt
|
||||
isXSSAttempt = (string) => {
|
||||
isXSSAttempt(string) {
|
||||
if (regexXSS.test(string)) {
|
||||
return true
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user