added manuallog object to allow users to create a sign in/out log for the swipedatacontroller log.
This commit is contained in:
parent
38fab21afd
commit
760f37b14b
@ -44,6 +44,7 @@
|
|||||||
<Compile Include="IRepository.cs" />
|
<Compile Include="IRepository.cs" />
|
||||||
<Compile Include="Identifier.cs" />
|
<Compile Include="Identifier.cs" />
|
||||||
<Compile Include="IdentifierList.cs" />
|
<Compile Include="IdentifierList.cs" />
|
||||||
|
<Compile Include="ManualLog.cs" />
|
||||||
<Compile Include="OperationResponse.cs" />
|
<Compile Include="OperationResponse.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="TimeLog.cs" />
|
<Compile Include="TimeLog.cs" />
|
||||||
|
|||||||
14
DataCenter_Windows/WindowsDataCenter/Interfaces/ManualLog.cs
Normal file
14
DataCenter_Windows/WindowsDataCenter/Interfaces/ManualLog.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,16 +6,28 @@ using Interfaces;
|
|||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
[RoutePrefix("api/swipedata")]
|
[RoutePrefix("api/swipedata")]
|
||||||
public class SwipeDataController : ApiController
|
public class SwipeDataController : ApiController
|
||||||
{
|
{
|
||||||
private readonly IRepository _repo;
|
private readonly IRepository _repo;
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repo"></param>
|
||||||
public SwipeDataController(IRepository repo)
|
public SwipeDataController(IRepository repo)
|
||||||
{
|
{
|
||||||
if(repo == null) throw new ArgumentNullException();
|
if(repo == null) throw new ArgumentNullException();
|
||||||
_repo = repo;
|
_repo = repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cData"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("")]
|
[Route("")]
|
||||||
public IHttpActionResult PostData([FromBody] CardData cData)
|
public IHttpActionResult PostData([FromBody] CardData cData)
|
||||||
@ -28,10 +40,14 @@ namespace WindowsDataCenter
|
|||||||
Content = new StringContent(logId.ToString())
|
Content = new StringContent(logId.ToString())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
//need another method here for posting.
|
///
|
||||||
//public IHttpActionResult ManuallyPostData([FromBody] ManualLog log){
|
/// </summary>
|
||||||
//
|
/// <param name="log"></param>
|
||||||
//}
|
/// <returns></returns>
|
||||||
|
public IHttpActionResult ManuallyPostData([FromBody] ManualLog log)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user