Skip to content

Commit

Permalink
log curve
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbasti committed Sep 9, 2024
1 parent 7adafd5 commit cf913d5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Src/WitsmlExplorer.Api/HttpHandlers/LogCurvePriorityHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@ namespace WitsmlExplorer.Api.HttpHandlers
{
public static class LogCurvePriorityHandler
{
[Produces(typeof(List<string>))]
[Produces(typeof(LogCurvePriorities))]
public static async Task<IResult> GetPrioritizedCurves(string wellUid, string wellboreUid, ILogCurvePriorityService logCurvePriorityService)
{
var prioritizedCurves = await logCurvePriorityService.GetPrioritizedCurves(wellUid, wellboreUid) ?? new List<string>();
return TypedResults.Ok(prioritizedCurves);
var prioritizedGlobalCurves =
await logCurvePriorityService.GetPrioritizedGlobalCurves() ?? new List<string>();
var result = new LogCurvePriorities()
{
PrioritizedCurves = prioritizedCurves,
PrioritizedGlobalCurves = prioritizedGlobalCurves
};
return TypedResults.Ok(result);
}

[Produces(typeof(IList<string>))]
[Produces(typeof(LogCurvePriorities))]
public static async Task<IResult> SetPrioritizedCurves(string wellUid, string wellboreUid, LogCurvePriorities priorities, ILogCurvePriorityService logCurvePriorityService)
{
var createdPrioritizedCurves = await logCurvePriorityService.SetPrioritizedCurves(wellUid, wellboreUid, priorities) ?? new List<string>();
var createdPrioritizedCurves = await logCurvePriorityService.SetPrioritizedCurves(wellUid, wellboreUid, priorities) ?? new LogCurvePriorities();
return TypedResults.Ok(createdPrioritizedCurves);
}
}
Expand Down

0 comments on commit cf913d5

Please sign in to comment.