From 3f75f713887408a454c247d39f944c750d17ad48 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Tue, 27 Jun 2023 22:08:50 -0400 Subject: [PATCH] Update deps - Use new funcs in beta3 of doc lib --- .../Application/JobsJobsJobs.Application.fsproj | 4 ++++ src/JobsJobsJobs/Citizens/Data.fs | 16 ++++++---------- .../Citizens/JobsJobsJobs.Citizens.fsproj | 4 ++++ .../Common/JobsJobsJobs.Common.fsproj | 15 ++++++++------- src/JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj | 4 ++++ .../Listings/JobsJobsJobs.Listings.fsproj | 4 ++++ .../Profiles/JobsJobsJobs.Profiles.fsproj | 4 ++++ src/JobsJobsJobs/SuccessStories/Data.fs | 1 - .../JobsJobsJobs.SuccessStories.fsproj | 4 ++++ 9 files changed, 38 insertions(+), 18 deletions(-) diff --git a/src/JobsJobsJobs/Application/JobsJobsJobs.Application.fsproj b/src/JobsJobsJobs/Application/JobsJobsJobs.Application.fsproj index ce78571..ef31249 100644 --- a/src/JobsJobsJobs/Application/JobsJobsJobs.Application.fsproj +++ b/src/JobsJobsJobs/Application/JobsJobsJobs.Application.fsproj @@ -25,4 +25,8 @@ + + + + diff --git a/src/JobsJobsJobs/Citizens/Data.fs b/src/JobsJobsJobs/Citizens/Data.fs index edbb074..a0a381e 100644 --- a/src/JobsJobsJobs/Citizens/Data.fs +++ b/src/JobsJobsJobs/Citizens/Data.fs @@ -78,10 +78,8 @@ let register (citizen : Citizen) (security : SecurityInfo) = backgroundTask { } /// Try to find the security information matching a confirmation token -let private tryConfirmToken (token : string) = backgroundTask { - let! tryInfo = Find.byContains Table.SecurityInfo {| token = token; tokenUsage = "confirm" |} - return List.tryHead tryInfo -} +let private tryConfirmToken (token : string) = + Find.firstByContains Table.SecurityInfo {| token = token; tokenUsage = "confirm" |} /// Confirm a citizen's account let confirmAccount token = backgroundTask { @@ -104,11 +102,10 @@ let denyAccount token = backgroundTask { } /// Attempt a user log on -let tryLogOn email password (pwVerify : Citizen -> string -> bool option) (pwHash : Citizen -> string -> string) - now = backgroundTask { +let tryLogOn (email : string) password (pwVerify : Citizen -> string -> bool option) + (pwHash : Citizen -> string -> string) now = backgroundTask { do! checkForPurge false - let! tryCitizen = Find.byContains Table.Citizen {| email = email |} - match List.tryHead tryCitizen with + match! Find.firstByContains Table.Citizen {| email = email |} with | Some citizen -> let citizenId = CitizenId.toString citizen.Id let! tryInfo = Find.byId Table.SecurityInfo citizenId @@ -149,6 +146,5 @@ let tryByEmailWithSecurity email = /// Try to retrieve security information by the given token let trySecurityByToken (token : string) = backgroundTask { do! checkForPurge false - let! results = Find.byContains Table.SecurityInfo {| token = token |} - return List.tryHead results + return! Find.firstByContains Table.SecurityInfo {| token = token |} } diff --git a/src/JobsJobsJobs/Citizens/JobsJobsJobs.Citizens.fsproj b/src/JobsJobsJobs/Citizens/JobsJobsJobs.Citizens.fsproj index a482b86..a5e8b06 100644 --- a/src/JobsJobsJobs/Citizens/JobsJobsJobs.Citizens.fsproj +++ b/src/JobsJobsJobs/Citizens/JobsJobsJobs.Citizens.fsproj @@ -16,4 +16,8 @@ + + + + diff --git a/src/JobsJobsJobs/Common/JobsJobsJobs.Common.fsproj b/src/JobsJobsJobs/Common/JobsJobsJobs.Common.fsproj index 50111ed..81a55e4 100644 --- a/src/JobsJobsJobs/Common/JobsJobsJobs.Common.fsproj +++ b/src/JobsJobsJobs/Common/JobsJobsJobs.Common.fsproj @@ -15,18 +15,19 @@ - + - + - - - + + + - - + + + diff --git a/src/JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj b/src/JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj index 8ea4765..a7f2bf8 100644 --- a/src/JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj +++ b/src/JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj @@ -13,4 +13,8 @@ + + + + diff --git a/src/JobsJobsJobs/Listings/JobsJobsJobs.Listings.fsproj b/src/JobsJobsJobs/Listings/JobsJobsJobs.Listings.fsproj index d1a4eb8..771d401 100644 --- a/src/JobsJobsJobs/Listings/JobsJobsJobs.Listings.fsproj +++ b/src/JobsJobsJobs/Listings/JobsJobsJobs.Listings.fsproj @@ -16,4 +16,8 @@ + + + + diff --git a/src/JobsJobsJobs/Profiles/JobsJobsJobs.Profiles.fsproj b/src/JobsJobsJobs/Profiles/JobsJobsJobs.Profiles.fsproj index fbbd92f..edb2c4f 100644 --- a/src/JobsJobsJobs/Profiles/JobsJobsJobs.Profiles.fsproj +++ b/src/JobsJobsJobs/Profiles/JobsJobsJobs.Profiles.fsproj @@ -15,4 +15,8 @@ + + + + diff --git a/src/JobsJobsJobs/SuccessStories/Data.fs b/src/JobsJobsJobs/SuccessStories/Data.fs index 0e6fd45..d34621e 100644 --- a/src/JobsJobsJobs/SuccessStories/Data.fs +++ b/src/JobsJobsJobs/SuccessStories/Data.fs @@ -4,7 +4,6 @@ open BitBadger.Npgsql.FSharp.Documents open JobsJobsJobs.Common.Data open JobsJobsJobs.Domain open JobsJobsJobs.SuccessStories.Domain -open Npgsql.FSharp // Retrieve all success stories let all () = diff --git a/src/JobsJobsJobs/SuccessStories/JobsJobsJobs.SuccessStories.fsproj b/src/JobsJobsJobs/SuccessStories/JobsJobsJobs.SuccessStories.fsproj index 7346b15..6dbd22a 100644 --- a/src/JobsJobsJobs/SuccessStories/JobsJobsJobs.SuccessStories.fsproj +++ b/src/JobsJobsJobs/SuccessStories/JobsJobsJobs.SuccessStories.fsproj @@ -17,4 +17,8 @@ + + + +