Exemplo n.º 1
0
        public IActionResult Post([FromBody] PastebinToCreateDTO dto)
        {
            if (dto == null)
            {
                return(BadRequest());
            }

            var pastebin = _pastebinService.CreatePastebin(dto);

            return(Created($"pastebins/{pastebin.Id}", pastebin));
        }
Exemplo n.º 2
0
        public async Task <PastebinCreatedDTO> CreatePastebin(PastebinToCreateDTO pastebin)
        {
            await _storageService.SavePastebinToStorage(pastebin.ObjectKey, pastebin.Content);

            throw new NotImplementedException();
        }