123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using UnivateProperties_API.Model.Financial;
- using UnivateProperties_API.Repository.Financial;
-
- namespace UnivateProperties_API.Controllers.Financial
- {
- [Route("api/[controller]")]
- [ApiController]
- public class FeesController : ControllerBase
- {
- private readonly IListingRepository _repo;
-
- public FeesController(IListingRepository rp)
- {
- _repo = rp;
- }
-
- // GET: api/Fees/listingFee
- [HttpGet("listingFee")]
- public IActionResult Get()
- {
- return new OkObjectResult(_repo.GetListingFee());
- }
-
- // POST: api/Fees
- [HttpPost("listingFee")]
- public IActionResult Post([FromBody] ListingFee fee)
- {
- var feeObj = _repo.insertListingFee(fee);
- if (feeObj != null)
- {
- return new OkObjectResult(fee);
- }
- else
- {
- return new NoContentResult();
- }
- }
-
- // PUT: api/Fees/5
- [HttpPut("{id}")]
- public void Put(int id, [FromBody] string value)
- {
- }
-
- // DELETE: api/ApiWithActions/5
- [HttpDelete("{id}")]
- public void Delete(int id)
- {
- }
- }
- }
|