예제 #1
0
        public async Task <IActionResult> ChangeIntroduction(SettingType type, string context)
        {
            try
            {
                switch (type)
                {
                case SettingType.Profile:
                    await _settingService.ChangeProfileAsync(context);

                    break;

                case SettingType.CV:
                    await _settingService.ChangeCVAsync(context);

                    break;

                case SettingType.About:
                    await _settingService.ChangeAboutAsync(context);

                    break;

                default:
                    break;
                }
                return(Json(new ReturnDto {
                    Message = "ok", State = "success"
                }));
            }
            catch (Exception e)
            {
                return(Json(new ReturnDto {
                    Message = e.Message, State = "error"
                }));
            }
        }