public IActionResult Create(long userId, [FromBody] JToken userCollection) { var houseID = userCollection?["houseID"]?.ToString(); var collection = _collectionService.AddOne(userId, houseID); return(Ok(new { success = true, message = "收藏成功.", data = collection })); }
public IActionResult Create([FromRoute] long userId, [FromBody] CollectionDTO userCollection) { var collection = _collectionService.AddOne(userId, userCollection?.houseID); return(Ok(new { success = true, message = "收藏成功.", data = collection })); }