Command Categories (more or less)
This commit is contained in:
parent
f30c136785
commit
58ba2980f9
29 changed files with 97 additions and 17 deletions
|
@ -38,6 +38,7 @@ namespace Geekbot.net.WebApi
|
|||
{
|
||||
Name = cmd.Name,
|
||||
Summary = cmd.Summary,
|
||||
Category = cmd.Remarks ?? CommandCategories.Uncategorized,
|
||||
IsAdminCommand = (param.Contains("admin")),
|
||||
Aliases = cmd.Aliases.ToArray(),
|
||||
Params = cmdParamsObj
|
||||
|
@ -60,6 +61,7 @@ namespace Geekbot.net.WebApi
|
|||
public class CommandDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Category { get; set; }
|
||||
public string Summary { get; set; }
|
||||
public bool IsAdminCommand { get; set; }
|
||||
public Array Aliases { get; set; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Nancy;
|
||||
using System;
|
||||
using Nancy;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.TinyIoc;
|
||||
|
||||
|
@ -13,8 +14,9 @@ namespace Geekbot.net.WebApi
|
|||
pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) =>
|
||||
{
|
||||
ctx.Response.WithHeader("Access-Control-Allow-Origin", "*")
|
||||
.WithHeader("Access-Control-Allow-Methods", "POST,GET")
|
||||
.WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type");
|
||||
.WithHeader("Access-Control-Allow-Methods", "GET")
|
||||
.WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type")
|
||||
.WithHeader("Last-Modified", DateTime.Now.ToString());
|
||||
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue