user read
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { Collection, Db } from 'mongodb';
|
||||
import { User } from '../../entities/user';
|
||||
import { User, UserWithPassword } from '../../entities/user';
|
||||
|
||||
class UserModel {
|
||||
private collection: Collection<User>;
|
||||
@ -8,7 +8,7 @@ class UserModel {
|
||||
this.collection = db.collection<User>('users');
|
||||
}
|
||||
|
||||
public async create(tracker: string, user: User) {
|
||||
public async create(tracker: string, user: UserWithPassword) {
|
||||
await this.collection.insertOne(user);
|
||||
return this.read(tracker, user.uuid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user