From 6908661bd14dec09de8e663cc010a4467166c649 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 15 Jan 2026 16:54:28 -0600 Subject: [PATCH] Fix mobile API organizations endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed bug where list_user_organizations was being called with user struct instead of user_id, causing 400 Bad Request errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- lib/towerops_web/controllers/api/mobile_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/towerops_web/controllers/api/mobile_controller.ex b/lib/towerops_web/controllers/api/mobile_controller.ex index 73cd6794..39f3e290 100644 --- a/lib/towerops_web/controllers/api/mobile_controller.ex +++ b/lib/towerops_web/controllers/api/mobile_controller.ex @@ -33,7 +33,7 @@ defmodule ToweropsWeb.Api.MobileController do user = conn.assigns.current_user organizations = - user + user.id |> Organizations.list_user_organizations() |> Enum.map(fn org -> %{