API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PropertyFieldsController.cs 961B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Microsoft.AspNetCore.Mvc;
  2. using UnivateProperties_API.Repository.Properties;
  3. namespace UnivateProperties_API.Controllers.Properties
  4. {
  5. [Route("Property/[controller]")]
  6. [ApiController]
  7. public class PropertyFieldsController : ControllerBase
  8. {
  9. private readonly IUserDefinedGroupRepository _Repo;
  10. public PropertyFieldsController(IUserDefinedGroupRepository repo)
  11. {
  12. _Repo = repo;
  13. }
  14. [HttpGet]
  15. public IActionResult Get()
  16. {
  17. return new OkObjectResult(_Repo.GetFieldList(""));
  18. }
  19. [HttpGet("{name}")]
  20. public IActionResult Get(string name)
  21. {
  22. return new OkObjectResult(_Repo.GetFieldList(name));
  23. }
  24. [HttpGet("{PropertyType}/{type}")]
  25. public IActionResult Get(string PropertyType, string type)
  26. {
  27. return new OkObjectResult(_Repo.GetFieldListByPropType(type));
  28. }
  29. }
  30. }