diff options
author | Adam Hathcock <adam@hathcock.co.uk> | 2012-07-04 17:40:38 +0100 |
---|---|---|
committer | Adam Hathcock <adam@hathcock.co.uk> | 2012-07-04 17:40:38 +0100 |
commit | bf75867286b2566e6e32ef5aa90da5f6f20f7d92 (patch) | |
tree | 1f1432018cda6f9e842d06161867547ad648a65c /ComicRackWebViewer/Modules/ListModule.cs | |
parent | b333891a929e5f6aabc005b6639b4bd91cee58ef (diff) | |
download | ComicRackWeb-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.cs | 22 |
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; }
+ }
+}
|