public IHttpActionResult ClockOut() { var authenticatedUser = this.ActionContext.RequestContext.Principal as ClaimsPrincipal; var username = authenticatedUser.Claims.FirstOrDefault(x => x.Type == "user_name").Value; var id = _accountService.GetAccountByUsername(username).GordonID; var result = _jobsService.ClockOut(id); if (result == null) { return(NotFound()); } return(Ok(result)); }