summaryrefslogtreecommitdiffstats
path: root/ComicRackWebViewer/Modules/ListModule.cs
diff options
context:
space:
mode:
authorAdam Hathcock <adam@hathcock.co.uk>2012-07-04 17:40:38 +0100
committerAdam Hathcock <adam@hathcock.co.uk>2012-07-04 17:40:38 +0100
commitbf75867286b2566e6e32ef5aa90da5f6f20f7d92 (patch)
tree1f1432018cda6f9e842d06161867547ad648a65c /ComicRackWebViewer/Modules/ListModule.cs
parentb333891a929e5f6aabc005b6639b4bd91cee58ef (diff)
downloadComicRackWeb-bf75867286b2566e6e32ef5aa90da5f6f20f7d92.zip
ComicRackWeb-bf75867286b2566e6e32ef5aa90da5f6f20f7d92.tar.gz
ComicRackWeb-bf75867286b2566e6e32ef5aa90da5f6f20f7d92.tar.bz2
Version 0.4.1
Diffstat (limited to 'ComicRackWebViewer/Modules/ListModule.cs')
-rw-r--r--ComicRackWebViewer/Modules/ListModule.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/ComicRackWebViewer/Modules/ListModule.cs b/ComicRackWebViewer/Modules/ListModule.cs
new file mode 100644
index 0000000..e63b50a
--- /dev/null
+++ b/ComicRackWebViewer/Modules/ListModule.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+using Nancy;
+
+namespace ComicRackWebViewer
+{
+ public class ListModule : NancyModule
+ {
+ public ListModule()
+ : base("/Lists")
+ {
+ Get["/{name}"] = x => View["IssuesList.cshtml", API.GetIssuesOfList(x.name, Context)];
+ Get["/{name}/Series"] = x => View["IssuesList.cshtml", API.GetIssuesOfList(x.name, Context).AsSeries()];
+ }
+ }
+
+ public class List
+ {
+ public string Name { get; set; }
+ public IEnumerable<Comic> Comics { get; set; }
+ public bool IsDesc { get; set; }
+ }
+}