express-ext 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/resources.js CHANGED
@@ -6,7 +6,7 @@ var https = require('https');
6
6
  var resources = (function () {
7
7
  function resources() {}
8
8
  resources.limits = [12, 24, 60, 100, 120, 180, 300, 600];
9
- resources.component = 'page';
9
+ resources.pages = 'pages';
10
10
  resources.page = 'page';
11
11
  resources.limit = 'limit';
12
12
  resources.defaultLimit = 12;
@@ -18,7 +18,7 @@ var resources = (function () {
18
18
  exports.resources = resources;
19
19
  function getView(req, view) {
20
20
  var partial = req.query[resources.partial];
21
- return partial == 'true' ? resources.component + '/' + view : view;
21
+ return partial == 'true' ? resources.pages + '/' + view : view;
22
22
  }
23
23
  exports.getView = getView;
24
24
  var TypeChecker = (function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-ext",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "express-ext",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
package/src/resources.ts CHANGED
@@ -10,7 +10,7 @@ export interface StringMap {
10
10
  // tslint:disable-next-line:class-name
11
11
  export class resources {
12
12
  static limits = [12, 24, 60, 100, 120, 180, 300, 600];
13
- static component = 'page';
13
+ static pages = 'pages';
14
14
  static page = 'page';
15
15
  static limit = 'limit';
16
16
  static defaultLimit = 12;
@@ -22,7 +22,7 @@ export class resources {
22
22
  }
23
23
  export function getView(req: Request, view: string): string {
24
24
  const partial = req.query[resources.partial];
25
- return partial == 'true' ? resources.component + '/' + view : view;
25
+ return partial == 'true' ? resources.pages + '/' + view : view;
26
26
  }
27
27
 
28
28
  export interface Validator<T> {