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="Identifier.cs" />
|
||||
<Compile Include="IdentifierList.cs" />
|
||||
<Compile Include="ManualLog.cs" />
|
||||
<Compile Include="OperationResponse.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.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
|
||||
{
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user