diff --git a/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs b/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs index 6efe21a6..04dda6e1 100644 --- a/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs +++ b/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs @@ -53,8 +53,6 @@ public class ProcessMapPlanBaseRequestWithWell : ProcessMapPlanBaseRequest : base(request) { IdWell = idWell; - UpdateFrom = request.UpdateFrom; - Moment = request.Moment; } /// diff --git a/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs b/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs index dddce26a..8b260c69 100644 --- a/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs +++ b/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs @@ -251,7 +251,6 @@ public abstract class ChangeLogRepositoryAbstract : ICh var entities = await query .Where(e => e.Obsolete == null) .OrderBy(e => e.Creation) - .ThenBy(e => e.Obsolete) .ThenBy(e => e.Id) .ToArrayAsync(token); diff --git a/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs b/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs index ed2d87a0..c7d75880 100644 --- a/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs +++ b/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs @@ -11,7 +11,7 @@ namespace AsbCloudWebApi.IntegrationTests.Data Hours = 1 }; - public static string RemoteUid = "555-555-555"; + public const string RemoteUid = "555-555-555"; public static Deposit[] Deposits => new Deposit[] { diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs index f1c951bf..4afd97f3 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs @@ -158,7 +158,7 @@ public abstract class ProcessMapPlanBaseController : ControllerBase [HttpGet("history")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task>>> Get([FromRoute] int idWell, DateTimeOffset? moment, CancellationToken token) + public async Task>>> GetHistory([FromRoute] int idWell, DateTimeOffset? moment, CancellationToken token) { await AssertUserHasAccessToWell(idWell, token); @@ -178,18 +178,17 @@ public abstract class ProcessMapPlanBaseController : ControllerBase /// /// /// + [AllowAnonymous] [HttpGet("/api/telemetry/{uid}/[controller]")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task>>> Get(string uid, DateTimeOffset? updateFrom, CancellationToken token) + public async Task>>> GetByUid(string uid, DateTimeOffset? updateFrom, CancellationToken token) { var idWell = telemetryService.GetIdWellByTelemetryUid(uid) ?? -1; if (idWell < 0) return this.ValidationBadRequest(nameof(uid), "Скважина по uid не найдена"); - await AssertUserHasAccessToWell(idWell, token); - var serviceRequest = new ProcessMapPlanBaseRequestWithWell(new ProcessMapPlanBaseRequest() { UpdateFrom = updateFrom,