예제 #1
0
        public IActionResult Get(string token)
        {
            var bot = storage.GetBot(token);

            if (bot == null)
            {
                return(NotFound());
            }

            var botLight = new BotLight()
            {
                Name = bot.Name
            };

            return(Ok(botLight));
        }
예제 #2
0
        public async Task <IActionResult> GetAsync(string token)
        {
            var bot = await storage.GetBotAsync(token);

            if (bot == null)
            {
                return(NotFound());
            }

            var botLight = new BotLight()
            {
                Name = bot.Name
            };

            return(Ok(botLight));
        }