Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83b70073e9 | ||
|
|
11025cc39a | ||
|
|
fb908a1cef | ||
|
|
6a6f7b35c7 | ||
| 715df08cbe |
@@ -86,6 +86,15 @@ module private Helpers =
|
|||||||
let asJson<'T> next ctx (o : 'T) =
|
let asJson<'T> next ctx (o : 'T) =
|
||||||
json o next ctx
|
json o next ctx
|
||||||
|
|
||||||
|
/// Work-around to let the Json.NET serializer synchronously deserialize from the request stream
|
||||||
|
// TODO: Remove this once there is an async serializer
|
||||||
|
let allowSyncIO : HttpHandler =
|
||||||
|
fun next ctx ->
|
||||||
|
match ctx.Features.Get<Features.IHttpBodyControlFeature>() with
|
||||||
|
| null -> ()
|
||||||
|
| f -> f.AllowSynchronousIO <- true
|
||||||
|
next ctx
|
||||||
|
|
||||||
|
|
||||||
/// Strongly-typed models for post requests
|
/// Strongly-typed models for post requests
|
||||||
module Models =
|
module Models =
|
||||||
@@ -156,6 +165,7 @@ module Request =
|
|||||||
/// POST /api/request
|
/// POST /api/request
|
||||||
let add : HttpHandler =
|
let add : HttpHandler =
|
||||||
authorize
|
authorize
|
||||||
|
>=> allowSyncIO
|
||||||
>=> fun next ctx ->
|
>=> fun next ctx ->
|
||||||
task {
|
task {
|
||||||
let! r = ctx.BindJsonAsync<Models.Request> ()
|
let! r = ctx.BindJsonAsync<Models.Request> ()
|
||||||
@@ -187,6 +197,7 @@ module Request =
|
|||||||
/// POST /api/request/[req-id]/history
|
/// POST /api/request/[req-id]/history
|
||||||
let addHistory requestId : HttpHandler =
|
let addHistory requestId : HttpHandler =
|
||||||
authorize
|
authorize
|
||||||
|
>=> allowSyncIO
|
||||||
>=> fun next ctx ->
|
>=> fun next ctx ->
|
||||||
task {
|
task {
|
||||||
use sess = session ctx
|
use sess = session ctx
|
||||||
@@ -218,6 +229,7 @@ module Request =
|
|||||||
/// POST /api/request/[req-id]/note
|
/// POST /api/request/[req-id]/note
|
||||||
let addNote requestId : HttpHandler =
|
let addNote requestId : HttpHandler =
|
||||||
authorize
|
authorize
|
||||||
|
>=> allowSyncIO
|
||||||
>=> fun next ctx ->
|
>=> fun next ctx ->
|
||||||
task {
|
task {
|
||||||
use sess = session ctx
|
use sess = session ctx
|
||||||
@@ -297,6 +309,7 @@ module Request =
|
|||||||
/// PATCH /api/request/[req-id]/snooze
|
/// PATCH /api/request/[req-id]/snooze
|
||||||
let snooze requestId : HttpHandler =
|
let snooze requestId : HttpHandler =
|
||||||
authorize
|
authorize
|
||||||
|
>=> allowSyncIO
|
||||||
>=> fun next ctx ->
|
>=> fun next ctx ->
|
||||||
task {
|
task {
|
||||||
use sess = session ctx
|
use sess = session ctx
|
||||||
@@ -314,6 +327,7 @@ module Request =
|
|||||||
/// PATCH /api/request/[req-id]/recurrence
|
/// PATCH /api/request/[req-id]/recurrence
|
||||||
let updateRecurrence requestId : HttpHandler =
|
let updateRecurrence requestId : HttpHandler =
|
||||||
authorize
|
authorize
|
||||||
|
>=> allowSyncIO
|
||||||
>=> fun next ctx ->
|
>=> fun next ctx ->
|
||||||
task {
|
task {
|
||||||
use sess = session ctx
|
use sess = session ctx
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<Version>2.0.1.0</Version>
|
<Version>2.1.2.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<PackageReference Include="FunctionalCuid" Version="1.0.0" />
|
<PackageReference Include="FunctionalCuid" Version="1.0.0" />
|
||||||
<PackageReference Include="Giraffe" Version="3.6.0" />
|
<PackageReference Include="Giraffe" Version="3.6.0" />
|
||||||
<PackageReference Include="Giraffe.TokenRouter" Version="1.0.0" />
|
<PackageReference Include="Giraffe.TokenRouter" Version="1.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
|
||||||
<PackageReference Include="Microsoft.FSharpLu" Version="0.10.29" />
|
<PackageReference Include="Microsoft.FSharpLu" Version="0.10.29" />
|
||||||
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.10.29" />
|
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.10.29" />
|
||||||
<PackageReference Include="RavenDb.Client" Version="4.2.1" />
|
<PackageReference Include="RavenDb.Client" Version="4.2.1" />
|
||||||
|
|||||||
@@ -90,11 +90,12 @@ module Configure =
|
|||||||
bldr.ConfigureServices svcs
|
bldr.ConfigureServices svcs
|
||||||
|
|
||||||
open Microsoft.Extensions.Logging
|
open Microsoft.Extensions.Logging
|
||||||
|
open Microsoft.Extensions.Hosting
|
||||||
|
|
||||||
/// Configure logging
|
/// Configure logging
|
||||||
let logging (bldr : IWebHostBuilder) =
|
let logging (bldr : IWebHostBuilder) =
|
||||||
let logz (log : ILoggingBuilder) =
|
let logz (log : ILoggingBuilder) =
|
||||||
let env = log.Services.BuildServiceProvider().GetService<IHostingEnvironment> ()
|
let env = log.Services.BuildServiceProvider().GetService<IWebHostEnvironment> ()
|
||||||
match env.IsDevelopment () with
|
match env.IsDevelopment () with
|
||||||
| true -> log
|
| true -> log
|
||||||
| false -> log.AddFilter(fun l -> l > LogLevel.Information)
|
| false -> log.AddFilter(fun l -> l > LogLevel.Information)
|
||||||
@@ -109,7 +110,7 @@ module Configure =
|
|||||||
let appConfig =
|
let appConfig =
|
||||||
Action<IApplicationBuilder> (
|
Action<IApplicationBuilder> (
|
||||||
fun (app : IApplicationBuilder) ->
|
fun (app : IApplicationBuilder) ->
|
||||||
let env = app.ApplicationServices.GetService<IHostingEnvironment> ()
|
let env = app.ApplicationServices.GetService<IWebHostEnvironment> ()
|
||||||
match env.IsDevelopment () with
|
match env.IsDevelopment () with
|
||||||
| true -> app.UseDeveloperExceptionPage ()
|
| true -> app.UseDeveloperExceptionPage ()
|
||||||
| false -> app.UseGiraffeErrorHandler Handlers.Error.error
|
| false -> app.UseGiraffeErrorHandler Handlers.Error.error
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "my-prayer-journal",
|
"name": "my-prayer-journal",
|
||||||
"version": "2.0.1",
|
"version": "2.1.3",
|
||||||
"description": "myPrayerJournal - Front End",
|
"description": "myPrayerJournal - Front End",
|
||||||
"author": "Daniel J. Summers <daniel@bitbadger.solutions>",
|
"author": "Daniel J. Summers <daniel@bitbadger.solutions>",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
"lint": "vue-cli-service lint",
|
"lint": "vue-cli-service lint",
|
||||||
"apistart": "cd ../MyPrayerJournal.Api && dotnet run",
|
"apistart": "cd ../MyPrayerJournal.Api && dotnet run",
|
||||||
"vue": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet run",
|
"vue": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet run",
|
||||||
"publish": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet publish -c Release"
|
"publish": "vue-cli-service build --modern && cd ../MyPrayerJournal.Api && dotnet publish -c Release -r linux-x64 --self-contained false"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"auth0-js": "^9.7.3",
|
"auth0-js": "^9.13.2",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"vue": "^2.5.15",
|
"vue": "^2.5.15",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ md-dialog(:md-active.sync='notesVisible').mpj-note-dialog
|
|||||||
md-dialog-actions
|
md-dialog-actions
|
||||||
md-button(@click='saveNotes()').md-primary #[md-icon save] Save
|
md-button(@click='saveNotes()').md-primary #[md-icon save] Save
|
||||||
md-button(@click='closeDialog()') #[md-icon undo] Cancel
|
md-button(@click='closeDialog()') #[md-icon undo] Cancel
|
||||||
.mpj-dialog-content
|
md-dialog-content(md-scrollbar='true').mpj-dialog-content
|
||||||
div(v-if='hasPriorNotes')
|
div(v-if='hasPriorNotes')
|
||||||
p.mpj-text-center: strong Prior Notes for This Request
|
p.mpj-text-center: strong Prior Notes for This Request
|
||||||
.mpj-note-list
|
.mpj-note-list
|
||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
this.progress.$emit('show', 'indeterminate')
|
this.progress.$emit('show', 'indeterminate')
|
||||||
try {
|
try {
|
||||||
const notes = await api.getNotes(this.form.requestId)
|
const notes = await api.getNotes(this.form.requestId)
|
||||||
this.priorNotes = notes.data
|
this.priorNotes = notes.data.sort((a, b) => b.asOf - a.asOf)
|
||||||
this.progress.$emit('done')
|
this.progress.$emit('done')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|||||||
3164
src/app/yarn.lock
3164
src/app/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user