Last active
December 19, 2018 16:43
-
-
Save jonasdw/1a67791e54ec6901ff2515fda6ba930d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Server | |
let historiek = | |
dagHistoriek | |
|> List.append werknemerHistoriek | |
|> List.sortBy (fun h -> h.At) | |
|> List.map (fun h -> { Naam = h.Naam }) | |
return { Historiek = historiek} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Library | |
type HistoriekTest = { | |
Naam : string | |
} | |
type HistoriekData = { Historiek : HistoriekTest list } | |
type IInternalApi = { | |
popularAlbums : Async<list<Album>> | |
historiek : string -> Async<HistoriekData> | |
} | |
module Server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let historiek = | |
dagHistoriek | |
|> List.append werknemerHistoriek | |
|> List.sortBy (fun h -> h.At) | |
return { Historiek = [ | |
{ Naam = (List.head historiek).Naam } | |
{ Naam = "Test2"; } | |
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SharedModels | |
open System | |
type HistoriekTest = { | |
Naam : string | |
At : DateTime | |
By : string | |
PayloadBeja : Object | |
} | |
type HistoriekData = { Historiek : HistoriekTest list } | |
type IInternalApi = { | |
historiek : string -> Async<HistoriekData> | |
} | |
module Server | |
let internalApi config : IInternalApi = { | |
popularAlbums = async { | |
return [ { Title = "Love Supreme" } ] | |
} | |
historiek = fun roosterId -> async { | |
let fetchHistoriek : FetchHistoriekVanRooster = { RoosterId = new Guid(roosterId) } | |
let dagHistoriek = Queries.historiekVanRooster (conn config.DatabaseConfiguration) { Claims = []; Payload = fetchHistoriek; CorrelationId = Guid.Empty } DagOutbox | |
let werknemerHistoriek = Queries.historiekVanRooster (conn config.DatabaseConfiguration) { Claims = []; Payload = fetchHistoriek; CorrelationId = Guid.Empty } WerknemerOutbox | |
let historiek = | |
dagHistoriek | |
|> List.append werknemerHistoriek | |
|> List.sortBy (fun h -> h.At) | |
|> List.map (fun h -> | |
{ | |
Naam = h.Naam | |
By = h.By | |
At = h.At | |
PayloadBeja = h.Payload | |
} | |
) | |
return { Historiek = historiek} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment