Skip to content

Commit

Permalink
spelling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elie222 committed Jun 5, 2019
1 parent b8c6028 commit 4afd515
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/src/modules/user/UserService.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { ModelType } from 'typegoose'
import UserModal, { User } from './UserEntity'
import UserModel, { User } from './UserEntity'

export class UserService {
private readonly modal: ModelType<User>
private readonly model: ModelType<User>

constructor() {
this.modal = UserModal
this.model = UserModel
}

async find(selector?: Partial<User>) {
return this.modal.find(selector)
return this.model.find(selector)
}

async findOneById(_id: string) {
return this.modal.findOne({ _id })
return this.model.findOne({ _id })
}

async remove(_id: string) {
let entityToRemove = await this.modal.findOne(_id)
await this.modal.remove(entityToRemove)
let entityToRemove = await this.model.findOne(_id)
await this.model.remove(entityToRemove)
}

async count(entity: any) {
return this.modal.count(entity)
return this.model.count(entity)
}
}

0 comments on commit 4afd515

Please sign in to comment.