Silownie: usuniecie /profile/gyms (dublowalo /gyms i /gyms/:id) - zakladka Moje silownie pokazuje wszystkie czlonkostwa z rolami, wiersz Silownie w profilu prowadzi na /gyms; naprawa przestarzalego testu plans.spec (stopka edytora usunieta w 57eccd4)

This commit is contained in:
tisachi
2026-09-13 18:54:18 +02:00
parent 06966067c1
commit 9bf43ed744
10 changed files with 59 additions and 646 deletions

View File

@@ -200,13 +200,6 @@ export function removeGymEquipment(gymId: string, equipmentId: string) {
return api(`/gyms/${gymId}/equipment/${encodeURIComponent(equipmentId)}`, { method: 'DELETE' });
}
/** The user's gyms where they hold the OWNER role (for gym management). */
export function useOwnedGyms() {
const { data, ...rest } = useGyms();
const owned = (data?.gyms ?? []).filter((g) => g.roles.includes('OWNER'));
return { ...rest, data: { gyms: owned } };
}
export function updateGym(
gymId: string,
body: {