Skip to content

Commit

Permalink
fix: adjust variable naming (#70)
Browse files Browse the repository at this point in the history
Refs: #59
Reviewed-By: Evelyn Gurschler <evelyn.gurschler@bmw.de>
  • Loading branch information
Phil91 authored Jul 31, 2024
1 parent 574055f commit 2853060
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/web/Dim.Web/Controllers/DimController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public static class DimController
{
public static RouteGroupBuilder MapDimApi(this RouteGroupBuilder group)
{
var policyHub = group.MapGroup("/dim");
var dim = group.MapGroup("/dim");

policyHub.MapPost("setup-dim", ([FromQuery] string companyName, [FromQuery] string bpn, [FromQuery] string didDocumentLocation, IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.StartSetupDim(companyName, bpn, didDocumentLocation, false))
dim.MapPost("setup-dim", ([FromQuery] string companyName, [FromQuery] string bpn, [FromQuery] string didDocumentLocation, IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.StartSetupDim(companyName, bpn, didDocumentLocation, false))
.WithSwaggerDescription("Gets the keys for the attributes",
"Example: Post: api/dim/setup-dim",
"the name of the company",
Expand All @@ -43,7 +43,7 @@ public static RouteGroupBuilder MapDimApi(this RouteGroupBuilder group)
.RequireAuthorization(r => r.RequireRole("setup_wallet"))
.Produces(StatusCodes.Status201Created);

policyHub.MapPost("setup-issuer", ([FromQuery] string companyName, [FromQuery] string bpn, [FromQuery] string didDocumentLocation, IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.StartSetupDim(companyName, bpn, didDocumentLocation, true))
dim.MapPost("setup-issuer", ([FromQuery] string companyName, [FromQuery] string bpn, [FromQuery] string didDocumentLocation, IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.StartSetupDim(companyName, bpn, didDocumentLocation, true))
.WithSwaggerDescription("Gets the keys for the attributes",
"Example: Post: api/dim/setup-issuer",
"the name of the company",
Expand All @@ -52,28 +52,28 @@ public static RouteGroupBuilder MapDimApi(this RouteGroupBuilder group)
.RequireAuthorization(r => r.RequireRole("setup_wallet"))
.Produces(StatusCodes.Status201Created);

policyHub.MapGet("status-list", ([FromQuery] string bpn, CancellationToken cancellationToken, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.GetStatusList(bpn, cancellationToken))
dim.MapGet("status-list", ([FromQuery] string bpn, CancellationToken cancellationToken, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.GetStatusList(bpn, cancellationToken))
.WithSwaggerDescription("Gets the status list for the given company",
"Example: GET: api/dim/status-list/{bpn}",
"id of the dim company")
.RequireAuthorization(r => r.RequireRole("view_status_list"))
.Produces(StatusCodes.Status200OK, responseType: typeof(string), contentType: Constants.JsonContentType);

policyHub.MapPost("status-list", ([FromQuery] string bpn, CancellationToken cancellationToken, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.CreateStatusList(bpn, cancellationToken))
dim.MapPost("status-list", ([FromQuery] string bpn, CancellationToken cancellationToken, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.CreateStatusList(bpn, cancellationToken))
.WithSwaggerDescription("Creates a status list for the given company",
"Example: Post: api/dim/status-list/{bpn}",
"bpn of the company")
.RequireAuthorization(r => r.RequireRole("create_status_list"))
.Produces(StatusCodes.Status200OK, responseType: typeof(string), contentType: Constants.JsonContentType);

policyHub.MapPost("technical-user/{bpn}", ([FromRoute] string bpn, [FromBody] TechnicalUserData technicalUserData, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.CreateTechnicalUser(bpn, technicalUserData))
dim.MapPost("technical-user/{bpn}", ([FromRoute] string bpn, [FromBody] TechnicalUserData technicalUserData, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.CreateTechnicalUser(bpn, technicalUserData))
.WithSwaggerDescription("Creates a technical user for the dim of the given bpn",
"Example: Post: api/dim/technical-user/{bpn}",
"bpn of the company")
.RequireAuthorization(r => r.RequireRole("create_technical_user"))
.Produces(StatusCodes.Status200OK, contentType: Constants.JsonContentType);

policyHub.MapPost("technical-user/{bpn}/delete", ([FromRoute] string bpn, [FromBody] TechnicalUserData technicalUserData, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.DeleteTechnicalUser(bpn, technicalUserData))
dim.MapPost("technical-user/{bpn}/delete", ([FromRoute] string bpn, [FromBody] TechnicalUserData technicalUserData, [FromServices] IDimBusinessLogic dimBusinessLogic) => dimBusinessLogic.DeleteTechnicalUser(bpn, technicalUserData))
.WithSwaggerDescription("Deletes a technical user with the given name of the given bpn",
"Example: Post: api/dim/technical-user/{bpn}/delete",
"bpn of the company")
Expand Down

0 comments on commit 2853060

Please sign in to comment.