Add a property "IsFavorite" for the drop zone.
This commit is contained in:
@@ -50,9 +50,9 @@ namespace skydiveLogs_api.Controllers
|
||||
|
||||
// PUT: api/DropZone/5
|
||||
[HttpPut("{id}")]
|
||||
public void Put(int id, [FromBody] DropZoneReq value)
|
||||
public bool Put(int id, [FromBody] DropZoneReq value)
|
||||
{
|
||||
_dropZoneService.UpdateDz(id, _mapper.Map<DropZone>(value));
|
||||
return _dropZoneService.UpdateDz(id, _mapper.Map<DropZone>(value));
|
||||
}
|
||||
|
||||
// DELETE: api/ApiWithActions/5
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using skydiveLogs_api.Business.Interface;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Model;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DataContract
|
||||
{
|
||||
public class DropZoneReq
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Latitude { get; set; }
|
||||
|
||||
public string Longitude { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Address { get; set; }
|
||||
|
||||
public string Website { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
|
||||
public IEnumerable<string> Type { get; set; }
|
||||
|
||||
public bool IsFavorite { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DataContract
|
||||
{
|
||||
@@ -22,5 +19,7 @@ namespace skydiveLogs_api.DataContract
|
||||
public string Email { get; set; }
|
||||
|
||||
public IEnumerable<string> Type { get; set; }
|
||||
|
||||
public bool IsFavorite { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user