Esempio n. 1
0
        public async Task <IActionResult> GetPins(string id)
        {
            try
            {
                var pins = await _boardService.GetPinsAsync(id);

                return(new ObjectResult(pins.Select(x => new
                {
                    id = x.Id,
                    description = x.Message.MarkdownText,
                    thumbnailId = x.ThumbnailId,
                    thumbnailBase64 = "data:image/jpeg;base64," + _pinService.GetBase64Thumbnail(x.ThumbnailId)
                })));
            }
            catch (Exception e)
            {
                return(NotFound(e.Message));
            }
        }