Exemplo n.º 1
0
        public async virtual Task <IActionResult> AddInstructor([FromBody] AddInstructorRequest body, [FromHeader] string correlationId, [FromHeader] bool?debug)
        {
            try
            {
                if (await _sessionService.AddInstructorAsync(body))
                {
                    return(Ok(new ViltConnectorSuccessResponse {
                        CorrelationId = correlationId, Status = "Success", Timestamp = DateTime.Now.ToString()
                    }));
                }

                return(NotFound(default(ViltConnectorError)));
            }
            catch (Exception exc)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, exc.ToViltError()));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// confirms that the provided e-mail address is valid.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public async Task <bool> AddInstructorAsync(AddInstructorRequest request)
 {
     //This isn't supposed to add instructor to our team meeting so we're assuming they just want to verify that the user exists before adding on the Cornerstone side.
     return(await UserExists(request.Email));
 }