Small tweaks to the web api

This commit is contained in:
runebaas 2018-05-14 00:41:05 +02:00
parent 4a11ce6207
commit 3004b19209
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
5 changed files with 25 additions and 10 deletions

View file

@ -2,19 +2,16 @@
using System.Reflection;
using System.Threading.Tasks;
using Discord.Commands;
using Geekbot.net.Lib;
using Nancy;
namespace Geekbot.net.WebApi.Help
{
public class HelpController : NancyModule
public sealed class HelpController : NancyModule
{
public HelpController()
public HelpController(CommandService commands)
{
Get("/v1/commands", args =>
{
var commands = GetCommands().Result;
var commandList = (from cmd in commands.Commands
let cmdParamsObj = cmd.Parameters.Select(cmdParam => new CommandParamDto
{