Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fable": {
"version": "5.5.0",
"version": "5.6.0",
"commands": [
"fable"
],
Expand Down
5 changes: 3 additions & 2 deletions src/Bridge/Services/Clients/BranchClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ type BranchClient(transport: IHttpTransport) =
for id in ids do
yield "id", (id: UrlPart)
| _ -> ()
if not (String.IsNullOrEmpty(queryParams.search)) then
yield "search", (queryParams.search: UrlPart)
match Option.ofObj queryParams.search with
| Some search when not (String.IsNullOrEmpty(search)) -> yield "search", (search: UrlPart)
| _ -> ()
if queryParams.pageNumber.HasValue then
yield "pageNumber", (queryParams.pageNumber.Value: UrlPart)
if queryParams.pageSize.HasValue then
Expand Down
5 changes: 3 additions & 2 deletions src/Bridge/Services/Clients/DepartmentClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ type DepartmentClient(transport: IHttpTransport) =
for id in ids do
yield "id", (id: UrlPart)
| _ -> ()
if not (String.IsNullOrEmpty(queryParams.search)) then
yield "search", (queryParams.search: UrlPart)
match Option.ofObj queryParams.search with
| Some search when not (String.IsNullOrEmpty(search)) -> yield "search", (search: UrlPart)
| _ -> ()
if queryParams.pageNumber.HasValue then
yield "pageNumber", (queryParams.pageNumber.Value: UrlPart)
if queryParams.pageSize.HasValue then
Expand Down
10 changes: 6 additions & 4 deletions src/Bridge/Services/Clients/EmployeeClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ type EmployeeClient(transport: IHttpTransport) =
for id in ids do
yield "id", (id: UrlPart)
| _ -> ()
if not (String.IsNullOrEmpty(queryParams.search)) then
yield "search", (queryParams.search: UrlPart)
match Option.ofObj queryParams.search with
| Some search when not (String.IsNullOrEmpty(search)) -> yield "search", (search: UrlPart)
| _ -> ()
if queryParams.pageNumber.HasValue then
yield "pageNumber", (queryParams.pageNumber.Value: UrlPart)
if queryParams.pageSize.HasValue then
Expand All @@ -33,8 +34,9 @@ type EmployeeClient(transport: IHttpTransport) =

let buildPagingUrl (queryParams: EmployeePagingRequestModel) =
let parameters =
[ if not (String.IsNullOrEmpty(queryParams.search)) then
yield "search", (queryParams.search: UrlPart)
[ match Option.ofObj queryParams.search with
| Some search when not (String.IsNullOrEmpty(search)) -> yield "search", (search: UrlPart)
| _ -> ()
if queryParams.pageNumber.HasValue then
yield "pageNumber", (queryParams.pageNumber.Value: UrlPart)
if queryParams.pageSize.HasValue then
Expand Down
4 changes: 3 additions & 1 deletion src/Bridge/Services/UrlHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Fossa.Bridge.Services.UrlHelpers


open System
open System.Globalization

let private suffixMappings =
[ ".dev.localhost:4211", ".dev.localhost:5210"
Expand Down Expand Up @@ -39,7 +40,8 @@ type UrlPart(value: string) =

static member op_Implicit(dt: DateTime) = UrlPart(string dt)

static member op_Implicit(dto: DateTimeOffset) = UrlPart(string dto)
static member op_Implicit(dto: DateTimeOffset) =
UrlPart(dto.ToString("O", CultureInfo.InvariantCulture))

let composeRelativeUrl
(endpointUrl: string)
Expand Down
Loading