services/UserService.ts
Function register
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async register(username: string, name: string, password: string, isAdmin: boolean) {
return new Promise( (resolve, reject) => {
this.knex('users').where({ username: username }).first()
.then((user) => {
if (user) {