Skip to content

Commit

Permalink
Remove unused methods and interfaces from repository classes
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdewid committed Aug 8, 2024
1 parent a4a906f commit 9d3437b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
using FunderMaps.Data.Repositories;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.DependencyInjection;
namespace FunderMaps.Data.Extensions;

/// <summary>
/// Provides extension methods for services from this assembly.
Expand Down
1 change: 1 addition & 0 deletions src/FunderMaps.Incident/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FunderMaps.Core.Extensions;
using FunderMaps.Core.ExternalServices;
using FunderMaps.Data.Extensions;
using FunderMaps.Incident.Components;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public sealed class MetaController(IUserdataRepository userdataRepository) : Fun
[HttpGet]
public async Task<IActionResult> GetAllAsync()
{
var rs = await userdataRepository.GetAsync(UserId, "app-0blu4s39"); // TODO: Move to ENV
return Content(rs.ToString(), "application/json"); // TODO
// TODO: Create a UserData entity
var metadata = await userdataRepository.GetAsync(UserId, "app-0blu4s39"); // TODO: Move to ENV
return Content(metadata.ToString() ?? "{}", "application/json");
}

// PUT: api/metadata
Expand Down
12 changes: 6 additions & 6 deletions src/FunderMaps.WebApi/Controllers/GeocoderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,32 @@ public Task<Neighborhood> GetNeighborhoodAsync(string id)

// GET: api/geocoder/district/{id}
/// <summary>
/// Get district by identifier.
/// Get district by identifier.
/// </summary>
/// <remarks>
/// Cache response for 12 hours. District will not change often.
/// Cache response for 12 hours. District will not change often.
/// </remarks>
[HttpGet("district/{id}"), ResponseCache(Duration = 60 * 60 * 12)]
public Task<District> GetDistrictAsync(string id)
=> geocoderTranslation.GetDistrictIdAsync(id);

// GET: api/geocoder/municipality/{id}
/// <summary>
/// Get municipality by identifier.
/// Get municipality by identifier.
/// </summary>
/// <remarks>
/// Cache response for 12 hours. Municipality will not change often.
/// Cache response for 12 hours. Municipality will not change often.
/// </remarks>
[HttpGet("municipality/{id}"), ResponseCache(Duration = 60 * 60 * 12)]
public Task<Municipality> GetMunicipalityAsync(string id)
=> geocoderTranslation.GetMunicipalityIdAsync(id);

// GET: api/geocoder/state/{id}
/// <summary>
/// Get state by identifier.
/// Get state by identifier.
/// </summary>
/// <remarks>
/// Cache response for 12 hours. State will not change often.
/// Cache response for 12 hours. State will not change often.
/// </remarks>
[HttpGet("state/{id}"), ResponseCache(Duration = 60 * 60 * 12)]
public Task<State> GetStateAsync(string id)
Expand Down
1 change: 1 addition & 0 deletions src/FunderMaps.WebApi/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FunderMaps.Core.Extensions;
using FunderMaps.Core.Middleware;
using FunderMaps.Data.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.HttpOverrides;
Expand Down
1 change: 1 addition & 0 deletions src/FunderMaps.Webservice/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FunderMaps.Core.Extensions;
using FunderMaps.Core.Middleware;
using FunderMaps.Data.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.HttpOverrides;
Expand Down
1 change: 1 addition & 0 deletions src/FunderMaps.Worker/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FunderMaps.Worker;
using FunderMaps.Data.Extensions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down

0 comments on commit 9d3437b

Please sign in to comment.