fix: ts compilation errors in auth

This commit is contained in:
Hamza-Ayed
2026-07-16 16:05:28 +03:00
parent 83f2d0854a
commit 4f11580d4a
7 changed files with 68 additions and 2 deletions
@@ -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);
}
}