From 8702723e01c50e3893d06638e80567b8e113feb8 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Tue, 23 Aug 2022 08:36:17 -0400 Subject: [PATCH] Fix request ID generation (#72) - Bump version --- publish.ps1 | 2 +- src/MyPrayerJournal/Handlers.fs | 5 ++++- src/MyPrayerJournal/MyPrayerJournal.fsproj | 7 ++++--- src/MyPrayerJournal/Views/Layout.fs | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/publish.ps1 b/publish.ps1 index 55d7390..fcbff77 100755 --- a/publish.ps1 +++ b/publish.ps1 @@ -1,3 +1,3 @@ #!/snap/bin/pwsh Set-Location src/MyPrayerJournal -dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained false \ No newline at end of file +dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained false --nologo \ No newline at end of file diff --git a/src/MyPrayerJournal/Handlers.fs b/src/MyPrayerJournal/Handlers.fs index 4bc6d43..a214345 100644 --- a/src/MyPrayerJournal/Handlers.fs +++ b/src/MyPrayerJournal/Handlers.fs @@ -318,7 +318,9 @@ module Legal = /// /api/request and /request(s) URLs module Request = - + + open Cuid + // GET /request/[req-id]/edit let edit requestId : HttpHandler = requireUser >=> fun next ctx -> task { let returnTo = @@ -461,6 +463,7 @@ module Request = let now = ctx.Now () let req = { Request.empty with + Id = Cuid.generate () |> RequestId UserId = userId EnteredOn = now ShowAfter = None diff --git a/src/MyPrayerJournal/MyPrayerJournal.fsproj b/src/MyPrayerJournal/MyPrayerJournal.fsproj index 3aa9800..7db94a5 100644 --- a/src/MyPrayerJournal/MyPrayerJournal.fsproj +++ b/src/MyPrayerJournal/MyPrayerJournal.fsproj @@ -1,7 +1,7 @@  net6.0 - 3.1.0 + 3.1.1 3391 @@ -23,8 +23,9 @@ - - + + + diff --git a/src/MyPrayerJournal/Views/Layout.fs b/src/MyPrayerJournal/Views/Layout.fs index eaee5d3..0e55c71 100644 --- a/src/MyPrayerJournal/Views/Layout.fs +++ b/src/MyPrayerJournal/Views/Layout.fs @@ -95,7 +95,7 @@ let toaster = let htmlFoot = footer [ _class "container-fluid" ] [ p [ _class "text-muted text-end" ] [ - str "myPrayerJournal v3.1" + str "myPrayerJournal v3.1.1" br [] em [] [ small [] [