init commit
This commit is contained in:
23
src/UntappedWidgetGenerator.Web/IndexModule.cs
Normal file
23
src/UntappedWidgetGenerator.Web/IndexModule.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using UntappedWidgetGenerator.Model;
|
||||
|
||||
namespace UntappedWidgetGenerator.Web
|
||||
{
|
||||
using Nancy;
|
||||
|
||||
public class IndexModule : NancyModule
|
||||
{
|
||||
public IndexModule()
|
||||
{
|
||||
Get["/{username}"] = parameters =>
|
||||
{
|
||||
return View["Views/Index/Index.cshtml", (string)parameters.username];
|
||||
};
|
||||
Post["/{username}"] = parameters =>
|
||||
{
|
||||
var info = new UntappedRepository().Get(parameters.username);
|
||||
return View["Profile", info];
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user