fix: ts compilation errors in auth
This commit is contained in:
@@ -22,4 +22,17 @@ export class UsersService {
|
||||
const user = this.userRepository.create({ tenant_id: tenantId, phone, role: role as UserRole });
|
||||
return this.userRepository.save(user);
|
||||
}
|
||||
|
||||
async listByTenant(tenantId: string): Promise<User[]> {
|
||||
return this.userRepository.find({ where: { tenant_id: tenantId } });
|
||||
}
|
||||
|
||||
async updateProfile(
|
||||
tenantId: string,
|
||||
id: string,
|
||||
data: Partial<Pick<User, 'name'>>,
|
||||
): Promise<User | null> {
|
||||
await this.userRepository.update({ tenant_id: tenantId, id }, { name: data.name });
|
||||
return this.findById(tenantId, id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user