Пример #1
0
        public async Task <IActionResult> CreateSocialLink([FromBody] CreateSocialLinkResource resource)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                var input = _mapper.Map <CreateSocialLinkResource, SocialLinks>(resource);
                input.AddedBy = _admin.Fullname;
                var socialLink = await _settingService.CreateSocialLink(input);

                return(Ok(new { message = "Sosial link yaradıldı" }));
            }
            catch (HttpException e)
            {
                return(StatusCode(e.StatusCode, e.Response));
            }
        }