Skip to content

Commit

Permalink
Fix typo and remove authentication requires for import action
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineatstariongroup committed Jan 20, 2025
1 parent 5c1bc66 commit cb7ae62
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace CometServer.Modules
/// <summary>
/// This is an API endpoint class to support the ECSS-E-TM-10-25-AnnexC exchange file format import
/// </summary>
public class ExchangeFileImportyApi : CarterModule
public class ExchangeFileImportApi : CarterModule
{
/// <summary>
/// The top container.
Expand All @@ -81,7 +81,7 @@ public class ExchangeFileImportyApi : CarterModule
/// <summary>
/// The (injected) <see cref="ILogger{ExchangeFileImportyApi}"/>
/// </summary>
private readonly ILogger<ExchangeFileImportyApi> logger;
private readonly ILogger<ExchangeFileImportApi> logger;

/// <summary>
/// The (injected) <see cref="IAppConfigService"/>
Expand All @@ -99,7 +99,7 @@ public class ExchangeFileImportyApi : CarterModule
private readonly ITokenGeneratorService tokenGeneratorService;

/// <summary>
/// Initializes a new instance of the <see cref="ExchangeFileImportyApi"/>
/// Initializes a new instance of the <see cref="ExchangeFileImportApi"/>
/// </summary>
/// <param name="appConfigService">
/// The (injected) <see cref="IAppConfigService"/>
Expand All @@ -113,7 +113,7 @@ public class ExchangeFileImportyApi : CarterModule
/// <param name="logger">
/// The (injected) <see cref="ILogger{ExchangeFileImportyApi}"/>
/// </param>
public ExchangeFileImportyApi(IAppConfigService appConfigService, ICometHasStartedService cometHasStartedService, ITokenGeneratorService tokenGeneratorService, ILogger<ExchangeFileImportyApi> logger)
public ExchangeFileImportApi(IAppConfigService appConfigService, ICometHasStartedService cometHasStartedService, ITokenGeneratorService tokenGeneratorService, ILogger<ExchangeFileImportApi> logger)
{
this.appConfigService = appConfigService;
this.cometHasStartedService = cometHasStartedService;
Expand All @@ -133,18 +133,18 @@ public override void AddRoutes(IEndpointRouteBuilder app)
IRequestUtils requestUtils, ICdp4TransactionManager transactionManager, IJsonExchangeFileReader jsonExchangeFileReader, IMigrationService migrationService, IRevisionService revisionService, IEngineeringModelDao engineeringModelDao, Services.IServiceProvider serviceProvider, IPersonService personService, IPersonRoleService personRoleService, IPersonPermissionService personPermissionService, IDefaultPermissionProvider defaultPermissionProvider, IParticipantRoleService participantRoleService, IParticipantPermissionService participantPermissionService, IDataStoreController dataStoreController, ISiteDirectoryService siteDirectoryService, IEngineeringModelSetupService engineeringModelSetupService) =>
{
await this.SeedDataStore(req, res, requestUtils, transactionManager, jsonExchangeFileReader, migrationService, revisionService, engineeringModelDao, serviceProvider, personService, personRoleService, personPermissionService, defaultPermissionProvider, participantRoleService, participantPermissionService, dataStoreController, siteDirectoryService, engineeringModelSetupService);
}).RequireAuthorization(new[] { AnonymousAuthenticationDefaults.AuthenticationScheme });
});

app.MapPost("/Data/Import", async (HttpRequest req, HttpResponse res,
IRequestUtils requestUtils, ICdp4TransactionManager transactionManager, IJsonExchangeFileReader jsonExchangeFileReader, IMigrationService migrationService, IRevisionService revisionService, IEngineeringModelDao engineeringModelDao, Services.IServiceProvider serviceProvider, IPersonService personService, IPersonRoleService personRoleService, IPersonPermissionService personPermissionService, IDefaultPermissionProvider defaultPermissionProvider, IParticipantRoleService participantRoleService, IParticipantPermissionService participantPermissionService, IDataStoreController dataStoreController) =>
{
await this.ImportDataStore(req, res, requestUtils, transactionManager, jsonExchangeFileReader, migrationService, revisionService, engineeringModelDao, serviceProvider, personService, personRoleService, personPermissionService, defaultPermissionProvider, participantRoleService, participantPermissionService, dataStoreController);
}).RequireAuthorization(new[] { AnonymousAuthenticationDefaults.AuthenticationScheme });
});

app.MapPost("/Data/Restore", async (HttpRequest req, HttpResponse res, IDataStoreController dataStoreController) =>
{
await this.RestoreDatastore(req, res, dataStoreController);
}).RequireAuthorization(new[] { AnonymousAuthenticationDefaults.AuthenticationScheme });
});
}

/// <summary>
Expand Down

0 comments on commit cb7ae62

Please sign in to comment.