Skip to content

Commit

Permalink
Do not set access=no anymore #190
Browse files Browse the repository at this point in the history
  • Loading branch information
elektrolytmangel committed Sep 17, 2024
1 parent 9c59715 commit 831a3a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions backend/DefibrillatorFunction.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using DefikarteBackend.Cache;
using DefikarteBackend.Cache;
using DefikarteBackend.Configuration;
using DefikarteBackend.Model;
using DefikarteBackend.OsmOverpassApi;
Expand All @@ -22,6 +15,13 @@
using OsmSharp;
using OsmSharp.IO.API;
using OsmSharp.Tags;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;

namespace DefikarteBackend
{
Expand Down Expand Up @@ -169,7 +169,7 @@ private static Node CreateNode(DefibrillatorRequest request)
"operator", request.Operator
},
{
"access", request.Access ? "yes" : "no"
"access", request.Access ? "yes" : null
},
{
"indoor", request.Indoor ? "yes" : "no"
Expand Down
20 changes: 10 additions & 10 deletions backend/DefibrillatorFunctionV2.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using DefikarteBackend.Cache;
using DefikarteBackend.Cache;
using DefikarteBackend.Configuration;
using DefikarteBackend.Model;
using DefikarteBackend.OsmOverpassApi;
Expand All @@ -22,6 +15,13 @@
using OsmSharp;
using OsmSharp.IO.API;
using OsmSharp.Tags;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;

namespace DefikarteBackend
{
Expand Down Expand Up @@ -73,7 +73,7 @@ public async Task<IActionResult> GetAll(


[FunctionName("Defibrillators_POST_V2")]
[OpenApiOperation(operationId: "CreateDefibrillator_V2", tags: new[] {"Defibrillator-V2"}, Summary = "Create a new defibrillator.")]
[OpenApiOperation(operationId: "CreateDefibrillator_V2", tags: new[] { "Defibrillator-V2" }, Summary = "Create a new defibrillator.")]
[OpenApiRequestBody("application/json", typeof(DefibrillatorRequestV2))]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.Created, contentType: "application/json", bodyType: typeof(DefibrillatorResponse), Description = "The OK response")]
[OpenApiSecurity("Defikarte.ch API-Key", SecuritySchemeType.ApiKey, In = OpenApiSecurityLocationType.Header, Name = "x-functions-key")]
Expand Down Expand Up @@ -169,7 +169,7 @@ private static Node CreateNode(DefibrillatorRequestV2 request)
"operator", request.Operator
},
{
"access", request.Access
"access", request.Access == "no" ? null : request.Access
},
{
"indoor", request.Indoor
Expand Down

0 comments on commit 831a3a4

Please sign in to comment.