|
@@ -84,6 +84,25 @@ namespace UnivateProperties_API.Controllers.Properties
|
84
|
84
|
return new OkObjectResult(_Repo.GetDisplay(search));
|
85
|
85
|
}
|
86
|
86
|
|
|
87
|
+ //Will need to come out. Post search not working......:(
|
|
88
|
+ [HttpGet("search/{userId}/{keyword}/{salesType}/{propertyUsageType}/{propertyType}/{province}/{city}/{suburb}")]
|
|
89
|
+ public IActionResult Search(int userId, string keyword, string salesType, string propertyUsageType, string propertyType, string province, string city, string suburb)
|
|
90
|
+ {
|
|
91
|
+ var search = new PropertySearch()
|
|
92
|
+ {
|
|
93
|
+ UserID = userId,
|
|
94
|
+ Keyword = keyword,
|
|
95
|
+ SalesType = salesType,
|
|
96
|
+ PropertyUsageType = propertyUsageType,
|
|
97
|
+ PropertyType = propertyType,
|
|
98
|
+ Province = province,
|
|
99
|
+ City = city,
|
|
100
|
+ Suburb = suburb
|
|
101
|
+ };
|
|
102
|
+
|
|
103
|
+ return new OkObjectResult(_Repo.GetDisplay(search));
|
|
104
|
+ }
|
|
105
|
+
|
87
|
106
|
[HttpPost]
|
88
|
107
|
public IActionResult Post([FromBody] Property property)
|
89
|
108
|
{
|