added manuallog object to allow users to create a sign in/out log for the swipedatacontroller log.

This commit is contained in:
chris.watts90@outlook.com 2017-02-09 21:36:22 +00:00
parent 38fab21afd
commit 760f37b14b
3 changed files with 36 additions and 5 deletions

View File

@ -44,6 +44,7 @@
<Compile Include="IRepository.cs" />
<Compile Include="Identifier.cs" />
<Compile Include="IdentifierList.cs" />
<Compile Include="ManualLog.cs" />
<Compile Include="OperationResponse.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TimeLog.cs" />

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public class ManualLog
{
public int UserId { get; set; }
public DateTime LogDateTime { get; set; }
}
}

View File

@ -6,16 +6,28 @@ using Interfaces;
namespace WindowsDataCenter
{
/// <summary>
///
/// </summary>
[RoutePrefix("api/swipedata")]
public class SwipeDataController : ApiController
{
private readonly IRepository _repo;
/// <summary>
///
/// </summary>
/// <param name="repo"></param>
public SwipeDataController(IRepository repo)
{
if(repo == null) throw new ArgumentNullException();
_repo = repo;
}
/// <summary>
///
/// </summary>
/// <param name="cData"></param>
/// <returns></returns>
[HttpPost]
[Route("")]
public IHttpActionResult PostData([FromBody] CardData cData)
@ -28,10 +40,14 @@ namespace WindowsDataCenter
Content = new StringContent(logId.ToString())
});
}
//need another method here for posting.
//public IHttpActionResult ManuallyPostData([FromBody] ManualLog log){
//
//}
/// <summary>
///
/// </summary>
/// <param name="log"></param>
/// <returns></returns>
public IHttpActionResult ManuallyPostData([FromBody] ManualLog log)
{
throw new NotImplementedException();
}
}
}