ride reconcilation with driver profile update
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Distribution.Features.DriverComplianceConfig;
|
||||
using Distribution.Infra.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -8,7 +7,6 @@ namespace Distribution.Features.DriverProfile;
|
||||
[Route("api/driver-profiles")]
|
||||
public class DriverProfileController(
|
||||
DriverProfileService service,
|
||||
DriverComplianceConfigService complianceService,
|
||||
ICurrentUserService currentUser) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
@@ -60,7 +58,7 @@ public class DriverProfileController(
|
||||
[HttpGet("compliance")]
|
||||
public async Task<IActionResult> GetCompliance()
|
||||
{
|
||||
var result = await complianceService.GetAsync();
|
||||
var result = await service.GetComplianceConfigAsync();
|
||||
return result is null ? NoContent() : Ok(result);
|
||||
}
|
||||
|
||||
@@ -68,7 +66,7 @@ public class DriverProfileController(
|
||||
public async Task<IActionResult> UpsertCompliance(UpdateDriverComplianceConfigRequest request, CancellationToken ct)
|
||||
{
|
||||
var userId = currentUser.UserId ?? throw new UnauthorizedAccessException();
|
||||
var result = await complianceService.UpsertAsync(request, userId, ct);
|
||||
var result = await service.UpsertComplianceConfigAsync(request, userId, ct);
|
||||
return Ok(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user