Showing 2 of 2 total issues
Function update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.update = async newProperties => {
const oldProps = await this.find(newProperties.id);
const properties = { ...oldProps, ...newProperties };
if (newProperties.password) {
const saltRounds = 10;
Function create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.create = async properties => {
const errors = await validate(properties);
if (errors) {
return { errors };
}