Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update path used to get option list ids #14437

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions backend/src/Designer/Controllers/AppDevelopmentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Altinn.Studio.Designer.Events;
using Altinn.Studio.Designer.Filters;
using Altinn.Studio.Designer.Helpers;
using Altinn.Studio.Designer.Infrastructure.GitRepository;
using Altinn.Studio.Designer.Models;
using Altinn.Studio.Designer.Models.Dto;
using Altinn.Studio.Designer.Services.Interfaces;
Expand All @@ -32,7 +31,6 @@ public class AppDevelopmentController : Controller
private readonly IAppDevelopmentService _appDevelopmentService;
private readonly IRepository _repository;
private readonly ISourceControl _sourceControl;
private readonly IAltinnGitRepositoryFactory _altinnGitRepositoryFactory;
private readonly ApplicationInsightsSettings _applicationInsightsSettings;
private readonly IMediator _mediator;

Expand All @@ -43,15 +41,13 @@ public class AppDevelopmentController : Controller
/// <param name="appDevelopmentService">The app development service</param>
/// <param name="repositoryService">The application repository service</param>
/// <param name="sourceControl">The source control service.</param>
/// <param name="altinnGitRepositoryFactory"></param>
/// <param name="applicationInsightsSettings">An <see cref="ApplicationInsightsSettings"/></param>
/// <param name="mediator"></param>
public AppDevelopmentController(IAppDevelopmentService appDevelopmentService, IRepository repositoryService, ISourceControl sourceControl, IAltinnGitRepositoryFactory altinnGitRepositoryFactory, ApplicationInsightsSettings applicationInsightsSettings, IMediator mediator)
public AppDevelopmentController(IAppDevelopmentService appDevelopmentService, IRepository repositoryService, ISourceControl sourceControl, ApplicationInsightsSettings applicationInsightsSettings, IMediator mediator)
{
_appDevelopmentService = appDevelopmentService;
_repository = repositoryService;
_sourceControl = sourceControl;
_altinnGitRepositoryFactory = altinnGitRepositoryFactory;
_applicationInsightsSettings = applicationInsightsSettings;
_mediator = mediator;
}
Expand Down Expand Up @@ -543,20 +539,6 @@ public ActionResult GetWidgetSettings(string org, string app)
return Ok(widgetSettings);
}

[HttpGet]
[Route("option-list-ids")]
public ActionResult GetOptionListIds(string org, string app)
{
string developer = AuthenticationHelper.GetDeveloperUserName(HttpContext);
AltinnAppGitRepository altinnAppGitRepository = _altinnGitRepositoryFactory.GetAltinnAppGitRepository(org, app, developer);
string[] optionListIds = altinnAppGitRepository.GetOptionsListIds();
if (optionListIds.Length == 0)
{
return NoContent();
}
return Ok(optionListIds);
}

[HttpGet("app-version")]
public VersionResponse GetAppVersion(string org, string app)
{
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/packages/shared/src/api/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const widgetSettingsPath = (org, app) => `${basePath}/${org}/${app}/app-d
export const optionListPath = (org, app, optionsListId) => `${basePath}/${org}/${app}/options/${optionsListId}`; // Get, Delete
export const optionListsPath = (org, app) => `${basePath}/${org}/${app}/options/option-lists`; // Get
export const optionListReferencesPath = (org, app) => `${basePath}/${org}/${app}/options/usage`; // Get
export const optionListIdsPath = (org, app) => `${basePath}/${org}/${app}/app-development/option-list-ids`; // Get
export const optionListIdsPath = (org, app) => `${basePath}/${org}/${app}/options`; // Get
export const optionListUpdatePath = (org, app, optionsListId) => `${basePath}/${org}/${app}/options/${optionsListId}`; // Put
export const optionListIdUpdatePath = (org, app, optionsListId) => `${basePath}/${org}/${app}/options/change-name/${optionsListId}`; // Put
export const optionListUploadPath = (org, app) => `${basePath}/${org}/${app}/options/upload`; // Post
Expand Down
Loading