diff --git a/backend/src/Designer/Controllers/OptionsController.cs b/backend/src/Designer/Controllers/OptionsController.cs index 6377fbecae3..56f23452ce0 100644 --- a/backend/src/Designer/Controllers/OptionsController.cs +++ b/backend/src/Designer/Controllers/OptionsController.cs @@ -3,6 +3,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Altinn.Studio.Designer.Exceptions.Options; using Altinn.Studio.Designer.Helpers; using Altinn.Studio.Designer.Models; using Altinn.Studio.Designer.Models.Dto; @@ -57,20 +58,40 @@ public ActionResult GetOptionsListIds(string org, string repo) /// /// Unique identifier of the organisation responsible for the app. /// Application identifier which is unique within an organisation. - /// Dictionary of all option lists belonging to the app + /// List of objects with all option lists belonging to the app with data + /// set if option list is valid, or hasError set if option list is invalid. [HttpGet] [Route("option-lists")] - public async Task>>> GetOptionLists(string org, string repo) + public async Task>> GetOptionLists(string org, string repo) { try { string developer = AuthenticationHelper.GetDeveloperUserName(HttpContext); string[] optionListIds = _optionsService.GetOptionsListIds(org, repo, developer); - Dictionary> optionLists = []; + List optionLists = []; foreach (string optionListId in optionListIds) { - List