Implemented some proper stubbing out method to return the defined object for testing.
Time logs yet to be fully implemented.
This commit is contained in:
parent
0bb6c8bc08
commit
83cef61519
@ -1,9 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
|
using Interfaces;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
@ -12,9 +16,13 @@ namespace WindowsDataCenter
|
|||||||
{
|
{
|
||||||
|
|
||||||
[Route("")]
|
[Route("")]
|
||||||
public IHttpActionResult GetTimeLogs([FromUri]int user, [FromUri]int calendarWeek)
|
public IHttpActionResult GetTimeLogs([FromUri]int userId, [FromUri]int calendarWeek)
|
||||||
{
|
{
|
||||||
return Json(new List<int> { 0, 1, 2});
|
var logList = new TimeLogList();
|
||||||
|
logList.CalendarWeek = calendarWeek;
|
||||||
|
var msg = new HttpResponseMessage(HttpStatusCode.OK);
|
||||||
|
msg.Content = new StringContent(JsonConvert.SerializeObject(logList),Encoding.UTF8, "application/json");
|
||||||
|
return ResponseMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user