Logging fixes / imporvements, voteTodo api

This commit is contained in:
mrfry 2020-11-29 10:04:18 +01:00
parent 4e34267d44
commit 865e97a754
6 changed files with 66 additions and 38 deletions

View file

@ -8,6 +8,13 @@ interface Options {
exceptions: Array<string>
}
const testUser = {
id: 19,
avaiblePWRequests: 999,
pwRequestCount: 19,
created: new Date(),
}
export default function(options: Options): any {
const { userDB, jsonResponse, exceptions } = options
@ -34,9 +41,7 @@ export default function(options: Options): any {
if (process.env.NS_NOUSER) {
req.session = {
user: {
id: 19,
},
user: testUser,
sessionID: sessionID || 111111111111111111,
isException: false,
}