Пример #1
0
        public IActionResult Post([FromBody] PastebinToCreateDTO dto)
        {
            if (dto == null)
            {
                return(BadRequest());
            }

            var pastebin = _pastebinService.CreatePastebin(dto);

            return(Created($"pastebins/{pastebin.Id}", pastebin));
        }
Пример #2
0
        public async Task <PastebinCreatedDTO> CreatePastebin(PastebinToCreateDTO pastebin)
        {
            await _storageService.SavePastebinToStorage(pastebin.ObjectKey, pastebin.Content);

            throw new NotImplementedException();
        }