Fix getting tennat

This commit is contained in:
Urtzi Alfaro
2025-09-12 19:31:24 +02:00
parent 55f31a3630
commit 4c21a5e1b2
5 changed files with 46 additions and 34 deletions

View File

@@ -30,7 +30,8 @@ export class TenantService {
}
async getUserTenants(userId: string): Promise<TenantResponse[]> {
return apiClient.get<TenantResponse[]>(`${this.baseUrl}/users/${userId}`);
// Use the /owned endpoint since /users/{userId} has validation issues
return apiClient.get<TenantResponse[]>(`${this.baseUrl}/user/${userId}/owned`);
}
async getUserOwnedTenants(userId: string): Promise<TenantResponse[]> {