Changeset db484c9 for Farmatiko


Ignore:
Timestamp:
01/26/21 10:33:09 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
7d80751
Parents:
8e74e2f
Message:

Fix bugs

Location:
Farmatiko/Controllers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Controllers/AdminController.cs

    r8e74e2f rdb484c9  
    33using System.Linq;
    44using System.Threading.Tasks;
     5using FarmatikoData.DTOs;
    56using FarmatikoData.Models;
    67using FarmatikoServices.FarmatikoServiceInterfaces;
     
    4647        {
    4748            await _service.AddPharmacyHead(pharmacyHead);
    48             return Ok();
     49            return Ok("Pharmacy added.");
    4950        }
    5051
     
    6566        [HttpPost]
    6667        [Route("api/pharmacyhead/{Id}")]
    67         public async Task<IActionResult> ApproveRequest([FromRoute]int Id, [FromBody]PharmacyHead pharmacyHead)
     68        public async Task<IActionResult> ApproveRequest([FromRoute]int Id, [FromBody]PharmacyHeadDto pharmacyHead)
    6869        {
    69             int id = Id;
    7070            await _phservice.UpdatePharmacyHead(pharmacyHead);
    7171            return Ok();
  • Farmatiko/Controllers/FarmatikoController.cs

    r8e74e2f rdb484c9  
    2424        {
    2525            //_JSONservice.DownloadPharmaciesExcel();
    26             _JSONservice.GetProcessedHealthcareWorkersFromJSON();
     26            //_JSONservice.GetProcessedHealthcareWorkersFromJSON();
    2727            //_JSONservice.GetProcessedHealthFacilitiesFromJSON();
    2828            //_JSONservice.GetProcessedMedicinesFromJSON();
  • Farmatiko/Controllers/LoginController.cs

    r8e74e2f rdb484c9  
    8282        public ActionResult Logout()
    8383        {
    84             // optionally "revoke" JWT token on the server side --> add the current token to a block-list
    85             // https://github.com/auth0/node-jsonwebtoken/issues/375
    86 
    8784            var userName = User.Identity.Name;
    8885            _jwtAuthManager.RemoveRefreshTokenByUserName(userName);
  • Farmatiko/Controllers/PharmacyHeadController.cs

    r8e74e2f rdb484c9  
    11using System.Collections.Generic;
    22using System.Threading.Tasks;
     3using FarmatikoData.DTOs;
    34using FarmatikoData.Models;
    45using FarmatikoServices.FarmatikoServiceInterfaces;
     
    1920
    2021        //GET
    21         /*
    22         [HttpGet]
    23         [Route("api/pharmacyhead")]
    24         public async Task<IEnumerable<PharmacyHead>> GetPharmacyHeadInfo()
    25         {
    26             var PHeads = await _PHService.GetPharmacyHeadInfo();
    27             return PHeads;
    28         }*/
    29 
     22       
    3023        [HttpGet]
    3124        [Route("api/pharmacyhead/{Id}")]
     
    3629        }
    3730        //POST
    38         /*
    39                 [HttpPost]
    40                 [Route("api/pharmacyhead/add")]
    41                 public async Task<IActionResult> AddPharmacyHead([FromBody] PharmacyHead pharmacyHead)
    42                 {
    43                     bool Success = await _PHService.Add(pharmacyHead);
    44                     return Ok(Success);
    45                 }*/
    46 
    47         /*[HttpPost]
    48         [Route("api/pharmacyhead/login")]
    49         public async Task<int> Login([FromBody]PharmacyHead pharmacyHead)
    50         {
    51             return await _PHService.Login(pharmacyHead);
    52         }*/
     31       
    5332        [HttpPut]
    5433        [Route("api/pharmacyhead/update")]
    55         public async Task UpdatePharmacyHead([FromBody] PharmacyHead pharmacyHead)
     34        public async Task<IActionResult> UpdatePharmacyHead([FromBody] PharmacyHeadDto pharmacyHead)
    5635        {
    5736            await _PHService.UpdatePharmacyHead(pharmacyHead);
     37            return Ok();
    5838        }
    5939        [HttpPost]
Note: See TracChangeset for help on using the changeset viewer.