Changeset 68454c6 for Farmatiko


Ignore:
Timestamp:
11/15/20 19:08:48 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
8b13eb2
Parents:
1db5673
Message:

fix bugs

Location:
Farmatiko
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/admin/admin.component.ts

    r1db5673 r68454c6  
    1919  public requests: IPharmacyHeadRequest[] = [];
    2020  public head: IPharmacyHead = {
    21     id: '',
    2221    PharmacyMedicines: null,
    2322    Pharmacy: null,
     
    5857        () => console.log("PharmacyHead inserted"));
    5958    this.head = {
    60       id: '',
    6159      PharmacyMedicines: null,
    6260      Pharmacy: null,
  • Farmatiko/ClientApp/src/app/shared/data.service.ts

    r1db5673 r68454c6  
    180180    //PharmacyHead PUT
    181181    updatePharmacyHead(head: IPharmacyHead) : Observable<IPharmacyHead> {
    182         return this.http.put<IPharmacyHead>(this.basePharmacyHead, head)
     182        return this.http.put<IPharmacyHead>(this.basePharmacyHead + '/update', head)
    183183                   .pipe(
    184184                        map((data) => {
  • Farmatiko/Controllers/PharmacyHeadController.cs

    r1db5673 r68454c6  
    99{
    1010    [ApiController]
    11     [Authorize(Roles = "PharmacyHead")]
     11    [Authorize(Roles = "PharmacyHead,Admin")]
    1212    public class PharmacyHeadController : Controller
    1313    {
     
    3636        }
    3737        //POST
    38         /*
     38/*
    3939        [HttpPost]
    4040        [Route("api/pharmacyhead/add")]
    41         public async Task<IActionResult> AddPharmacyHead([FromBody]PharmacyHead pharmacyHead)
     41        public async Task<IActionResult> AddPharmacyHead([FromBody] PharmacyHead pharmacyHead)
    4242        {
    4343            bool Success = await _PHService.Add(pharmacyHead);
     
    5252        }*/
    5353        [HttpPut]
    54         [Route("api/pharmacyhead")]
    55         [Authorize(Roles = "Admin")]
    56         [Authorize(Roles = "PharmacyHead")]
     54        [Route("api/pharmacyhead/update")]
    5755        public async Task UpdatePharmacyHead([FromBody]PharmacyHead pharmacyHead)
    5856        {
Note: See TracChangeset for help on using the changeset viewer.