express-ext 0.6.0 → 0.6.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/index.js +3 -6
- package/package.json +1 -1
- package/src/index.ts +4 -7
package/lib/index.js
CHANGED
|
@@ -40,9 +40,8 @@ __export(require("./search"))
|
|
|
40
40
|
__export(require("./SearchController"))
|
|
41
41
|
__export(require("./view"))
|
|
42
42
|
var SavedController = (function () {
|
|
43
|
-
function SavedController(savedService,
|
|
43
|
+
function SavedController(savedService, id, userId) {
|
|
44
44
|
this.savedService = savedService
|
|
45
|
-
this.log = log
|
|
46
45
|
this.userId = userId && userId.length > 0 ? userId : "userId"
|
|
47
46
|
this.id = id && id.length > 0 ? id : "id"
|
|
48
47
|
this.save = this.save.bind(this)
|
|
@@ -94,9 +93,8 @@ var SavedController = (function () {
|
|
|
94
93
|
})()
|
|
95
94
|
exports.SavedController = SavedController
|
|
96
95
|
var FollowController = (function () {
|
|
97
|
-
function FollowController(service,
|
|
96
|
+
function FollowController(service, id, userId) {
|
|
98
97
|
this.service = service
|
|
99
|
-
this.log = log
|
|
100
98
|
this.userId = userId && userId.length > 0 ? userId : "userId"
|
|
101
99
|
this.id = id && id.length > 0 ? id : "id"
|
|
102
100
|
this.follow = this.follow.bind(this)
|
|
@@ -148,8 +146,7 @@ var FollowController = (function () {
|
|
|
148
146
|
})()
|
|
149
147
|
exports.FollowController = FollowController
|
|
150
148
|
var UserReactionController = (function () {
|
|
151
|
-
function UserReactionController(
|
|
152
|
-
this.log = log
|
|
149
|
+
function UserReactionController(service, author, id, reaction) {
|
|
153
150
|
this.service = service
|
|
154
151
|
this.author = author
|
|
155
152
|
this.reaction = reaction
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express"
|
|
|
2
2
|
import { GenericController } from "./GenericController"
|
|
3
3
|
import { GenericSearchController } from "./GenericSearchController"
|
|
4
4
|
import { HealthController } from "./HealthController"
|
|
5
|
-
import { handleError,
|
|
5
|
+
import { handleError, query } from "./http"
|
|
6
6
|
import { LoadController } from "./LoadController"
|
|
7
7
|
import { LoadSearchController } from "./LoadSearchController"
|
|
8
8
|
import { LogController } from "./LogController"
|
|
@@ -49,7 +49,6 @@ export interface SavedService {
|
|
|
49
49
|
export class SavedController {
|
|
50
50
|
constructor(
|
|
51
51
|
protected savedService: SavedService,
|
|
52
|
-
protected log: (msg: string) => void,
|
|
53
52
|
id?: string,
|
|
54
53
|
userId?: string,
|
|
55
54
|
) {
|
|
@@ -107,7 +106,6 @@ export interface FollowService {
|
|
|
107
106
|
export class FollowController {
|
|
108
107
|
constructor(
|
|
109
108
|
protected service: FollowService,
|
|
110
|
-
protected log: Log,
|
|
111
109
|
id?: string,
|
|
112
110
|
userId?: string,
|
|
113
111
|
) {
|
|
@@ -165,11 +163,10 @@ export interface ReactService {
|
|
|
165
163
|
// tslint:disable-next-line:max-classes-per-file
|
|
166
164
|
export class UserReactionController {
|
|
167
165
|
constructor(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
public author: string,
|
|
166
|
+
protected service: ReactService,
|
|
167
|
+
protected author: string,
|
|
171
168
|
id: string,
|
|
172
|
-
|
|
169
|
+
protected reaction: string,
|
|
173
170
|
) {
|
|
174
171
|
this.id = id && id.length > 0 ? id : "id"
|
|
175
172
|
this.react = this.react.bind(this)
|