public MonadActionResult <IEnumerable <Message>, Error> GetMessages(int channelId, [FromQuery] string?searchTerm, [FromQuery] long?lastMessageId = null) => HttpContext.GetUserId() .Bind(userId => _channelsService.GetMessages(userId, channelId, searchTerm, lastMessageId));