removed braces.
added logging for when the selectedDate parameter is null (for current week). #9
This commit is contained in:
parent
69aaf53bb4
commit
21f87c9558
@ -30,16 +30,13 @@ namespace WindowsDataCenter
|
||||
[CacheControl(MaxAge = 0)]
|
||||
public IHttpActionResult GetTimeLogs([FromUri]int userId, [FromUri] DateTime? selectedDate = null)
|
||||
{
|
||||
_logger.Trace("Getting Time Logs for user with id: {0}, for the calendar week that the date {1} belongs to.", userId, selectedDate);
|
||||
_logger.Trace("Getting Time Logs for user with id: {0}, for the calendar week that the date {1} belongs to.", userId, selectedDate ?? DateTime.UtcNow.Date);
|
||||
TimeLogList logList;
|
||||
|
||||
if (selectedDate == null)
|
||||
{
|
||||
logList = _repo.GetTimeLogs(userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
logList = _repo.GetTimeLogs(userId, selectedDate.Value);
|
||||
}
|
||||
|
||||
_logger.Trace("Got Time logs for the user: {0}, returned {1} records", userId, logList.TimeLogCount);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user