Ignore:
Timestamp:
07/06/22 13:13:35 (2 years ago)
Author:
Danilo <danilo.najkov@…>
Branches:
master
Children:
899b19d
Parents:
d76b7ee
Message:

reservation module changes + contact module + menu module

Location:
resTools_backend/backend/Controllers
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • resTools_backend/backend/Controllers/ReservationsController.cs

    rd76b7ee rcc4db18  
    2727    }
    2828
     29    [Authorize]
     30    [HttpGet("new")]
     31    public async Task<List<ReservationResponse>> GetReservationsNew()
     32    {
     33        return await _reservationService.GetNewReservations();
     34    }
     35
    2936    [HttpPost()]
    3037    public async Task<IActionResult> CreateReservation([FromBody] CreateReservationRequest req)
     
    3542
    3643    [Authorize]
    37     [HttpPut("{rid}")]
     44    [HttpPut("{rid}/status")]
    3845    public async Task<IActionResult> ChangeStatus(int rid, [FromQuery] ReservationStatus status)
    3946    {
     
    4148        return Ok();
    4249    }
     50
     51    [Authorize]
     52    [HttpPut("{rid}/table")]
     53    public async Task<IActionResult> ChangeTable(int rid, [FromQuery] int tableId)
     54    {
     55        await _reservationService.AssignTable(tableId, rid);
     56        return Ok();
     57    }
    4358}
  • resTools_backend/backend/Controllers/RestaurantsController.cs

    rd76b7ee rcc4db18  
    3737        return response;
    3838    }
     39
     40    [HttpPost("upload")]
     41    public async Task<IActionResult> UploadImage([FromForm] IFormFile file)
     42    {
     43        await _restaurantService.UploadImage(file);
     44        return Ok();
     45    }
     46
     47    [Authorize]
     48    [HttpPut()]
     49    public async Task<IActionResult> UpdateRestaurant([FromBody] UpdateRestaurantRequest req)
     50    {
     51        await _restaurantService.UpdateRestaurant(req);
     52        return Ok();
     53    }
    3954}
Note: See TracChangeset for help on using the changeset viewer.