Пример #1
0
        public async Task <IActionResult> PostSuggestion(Suggestion suggestion)
        {
            if (suggestion.EntryId == 0)
            {
                return(BadRequest());
            }

            if (suggestion.PlayerId.HasValue && suggestion.PlayerId.Value > 0)
            {
                await _session.Publish(new VerifiedPLEntrySuggestionReceived(suggestion.EntryId, suggestion.ShortDesc(), suggestion.PlayerId.Value));
            }
            else
            {
                await _session.Publish(new VerifiedEntrySuggestionReceived(suggestion.EntryId, suggestion.ShortDesc()));
            }

            return(Ok());
        }