Implemented ESlint and passed down the rules

This commit is contained in:
Alexis
2021-01-20 19:07:56 +01:00
parent 615cced6ed
commit b318a88023
37 changed files with 2119 additions and 568 deletions

View File

@@ -360,7 +360,7 @@ class UserRepository {
})
.catch(err => {
// If the account already has an API key linked...
if (err.errno == 1062) {
if (err.errno === 1062) {
this.fetchAPIKey(user.uuid)
.then(old_api_key => {
reject({
@@ -473,7 +473,7 @@ class UserRepository {
})
// Unhandled errors
.catch(err => {
.catch(() => {
reject({
"message": "Une erreur inconnue est survenue.",
"code": 500,
@@ -541,7 +541,7 @@ class UserRepository {
resolve(v.toJSON({ omitPivot: true }));
})
.catch(err => {
console.log(err);
reject(err);
})
})
}