Esempio n. 1
0
        public async Task UpdateTwitchLink(int eventId, UpdateTwtichLinkCommand command)
        {
            var ev = await _dbContext.Events.FirstOrDefaultAsync();

            if (ev == null)
            {
                throw new HttpStatusCodeException(HttpStatusCode.NotFound);
            }

            ev.TwitchLink = command.Url;
            await _dbContext.SaveChangesAsync();
        }
Esempio n. 2
0
        public async Task <IActionResult> SetTwitchLink([FromRoute] int id, [FromBody] UpdateTwtichLinkCommand command)
        {
            await _eventService.UpdateTwitchLink(id, command);

            return(Ok());
        }