Skip to content

Commit

Permalink
fix error imports so they come directly from 'shared' folder b00tc4mp…
Browse files Browse the repository at this point in the history
  • Loading branch information
juditta99 committed Feb 29, 2024
1 parent b3b723c commit 54c58aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions staff/judy-grayland/project/api/logic/authenticateUser.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import bcrypt from 'bcryptjs'
import validate from '../../shared/validate.js'
import errors from '../../shared/errors.js'
import { errors } from 'shared'
const { NotFoundError, CredentialsError, SystemError } = errors

import { User } from '../data/models.js'
import { expect } from 'chai'

function authenticateUser(email, password) {
validate.email(email, 'email')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai'
import bcrypt from 'bcryptjs'
import random from './helpers/random.js'
import { errors } from 'shared'
const { NotFoundError, ContentError, CredentialsError } = errors
const { NotFoundError, CredentialsError } = errors

import { User } from '../data/models.js'
import authenticateUser from './authenticateUser.js'
Expand Down
3 changes: 1 addition & 2 deletions staff/judy-grayland/project/api/logic/registerUser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import bcrypt from 'bcryptjs'
import validate from '../../shared/validate.js'
import errors from '../../shared/errors.js'
import { validate, errors } from 'shared'
const { DuplicityError, SystemError } = errors

import { User } from '../data/models.js'
Expand Down
1 change: 1 addition & 0 deletions staff/judy-grayland/project/api/logic/registerUser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('registerUser', () => {
})
})
})

// it('fails on too short password', () => {
// const name = random.name()
// const email = random.email()
Expand Down

0 comments on commit 54c58aa

Please sign in to comment.