Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christer van der Meeren committed Dec 18, 2023
1 parent 111bf1b commit 6db930b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Felicity/Operations.fs
Expand Up @@ -257,7 +257,7 @@ type GetResourceOperation<'originalCtx, 'ctx, 'entity, 'id> = internal {
match StrictModeHelpers.checkForUnknownQueryParameters<'originalCtx> httpCtx req Set.empty with
| Error errs -> return! handleErrors errs next httpCtx
| Ok() ->
let! doc = resp.Write httpCtx ctx req (resDef, entity)
let! doc, _ = resp.Write httpCtx ctx req (resDef, entity)

let! fieldTrackerHandler =
httpCtx.RequestServices
Expand Down Expand Up @@ -1104,7 +1104,7 @@ type PatchOperation<'originalCtx, 'ctx, 'entity> = internal {

return! handler next httpCtx
else
let! doc = resp.Write httpCtx ctx req (rDef, entity4)
let! doc, _ = resp.Write httpCtx ctx req (rDef, entity4)

let! fieldTrackerHandler =
httpCtx.RequestServices
Expand Down
2 changes: 1 addition & 1 deletion src/Felicity/Relationships.fs
Expand Up @@ -578,7 +578,7 @@ type ToOneRelationship<'ctx, 'setCtx, 'entity, 'relatedEntity, 'relatedId> = int
| Skip -> return! handleErrors [ getRelWhileSkip () ] next httpCtx
| Include relatedEntity ->
let b = resolveEntity relatedEntity
let! doc = resp.Write httpCtx ctx req (b.resourceDef, b.entity)
let! doc, _ = resp.Write httpCtx ctx req (b.resourceDef, b.entity)

let! fieldTrackerHandler =
match this.idParsers with
Expand Down
2 changes: 1 addition & 1 deletion src/Felicity/Responder.fs
Expand Up @@ -21,7 +21,7 @@ type Responder<'ctx> internal (builder: ResponseBuilder<'ctx>, ctx, req) =
member _.WithEntity(resourceDef: ResourceDefinition<'ctx, 'entity, 'id>, entity: 'entity) : HttpHandler =
fun next httpCtx ->
task {
let! doc = builder.Write httpCtx ctx req (upcast resourceDef, entity)
let! doc, _ = builder.Write httpCtx ctx req (upcast resourceDef, entity)

let primaryResourceTypes =
primaryResourceTypesForFieldTracking |> Option.defaultValue [ resourceDef.name ]
Expand Down

0 comments on commit 6db930b

Please sign in to comment.