source: Farmatiko/Controllers/HealthFacilitiesController.cs@ c73269d

Last change on this file since c73269d was c73269d, checked in by Mile Jankuloski <mile.jankuloski@…>, 2 years ago

JSON processing added

  • Property mode set to 100644
File size: 1.1 KB
Line 
1using FarmatikoData;
2using FarmatikoData.Models;
3using FarmatikoServices.FarmatikoServiceInterfaces;
4using Microsoft.AspNetCore.Mvc;
5using Microsoft.Extensions.Logging;
6using Newtonsoft.Json;
7using Newtonsoft.Json.Linq;
8using System;
9using System.Collections.Generic;
10using System.Linq;
11using System.Net;
12using System.Threading.Tasks;
13
14namespace Farmatiko.Controllers
15{
16 [ApiController]
17 [Route("[controller]/[action]")]
18 public class HealthFacilitiesController : Controller
19 {
20 private IHealthFacilityService _healthFacilitiesService;
21 private IProcessJSONService _processJSONService;
22 public HealthFacilitiesController(IHealthFacilityService healthFacilitiesService, IProcessJSONService processJSONService)
23 {
24 _healthFacilitiesService = healthFacilitiesService;
25 _processJSONService = processJSONService;
26 }
27 [HttpGet]
28 public IQueryable<HealthFacilities> Get()
29 {
30 return _healthFacilitiesService.GetAll();
31 }
32 public void Index()
33 {
34 _processJSONService.GetProcessedHealthFacilitiesFromJSON();
35 }
36 }
37}
Note: See TracBrowser for help on using the repository browser.