コード例 #1
0
        public async Task <IActionResult> PutCardInformation([FromBody] CardInformationModelWithPassword model)
        {
            try
            {
                if (this.IsValidPassword(model.Password))
                {
                    var result = await this.studiCardRepository.PutCardInformationAsync(model);

                    Console.WriteLine("Put some Card Information.");
                    return(this.Ok(result));
                }
                return(this.Unauthorized());
            }
            catch (Exception e)
            {
                this.errorHandlingRepository.LogAndPrintError(e);
                return(this.BadRequest(new ErrorModel {
                    ErrorMessage = "Error while putting cardinformations."
                }));
            }
        }