Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

[RHMAP-18044] downgrade connect-redis version #143

Merged
merged 3 commits into from
Oct 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions cloud/wfm-rest-api/src/data-api/PagingDataRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ export interface PagingDataRepository<T> {
* Get specific item from database
* @param id - object id
*/
get(id: string): Promise<T>;
get(id: string): Promise<T|null>;

/**
* Store object in database
* @param object - object to store
*/
create(object: T): Promise<T>;
create(object: T): Promise<T|null>;

/**
* Update object
* @param object - object to update
* Note: id field of the object will be used to determine what should be updated
*/
update(object: T): Promise<T>;
update(object: T): Promise<T|null>;

/**
* Delete object from database
Expand Down
6 changes: 3 additions & 3 deletions cloud/wfm-rest-api/src/impl/MongoDbRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export class MongoDbRepository<T extends {
}
}

public get(id: string): Bluebird<T> {
public get(id: string): Bluebird<T|null> {
if (!this.db) {
return Bluebird.reject(dbError);
}
return Bluebird.resolve(this.collection.findOne({ id })).catch(this.handleError);
}

public create(object: T): Bluebird<T> {
public create(object: T): Bluebird<T|null> {
object.id = object.id || generate();
if (!this.db) {
return Bluebird.reject(dbError);
Expand All @@ -64,7 +64,7 @@ export class MongoDbRepository<T extends {
.catch(this.handleError);
}

public update(object: T): Bluebird<T> {
public update(object: T): Bluebird<T|null> {
if (!this.db) {
return Bluebird.reject(dbError);
}
Expand Down
5 changes: 3 additions & 2 deletions demo/server/config-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ var config = {
/// Redis session store configuration
// https://github.com/tj/connect-redis
"redisStore": {
"url": getRedisUrl(),
"prefix": "rc-session:",
"host": getRedisHost(),
"port": getRedisPort(),
"prefix": "rcsession:",
"logErrors": true
},
// Configuration for express session (used for both passport and keycloak)
Expand Down
5 changes: 3 additions & 2 deletions demo/server/config-prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ var config = {
/// Redis session store configuration
// https://github.com/tj/connect-redis
"redisStore": {
"url": getRedisUrl(),
"prefix": "rc-session:",
"host": getRedisHost(),
"port": getRedisPort(),
"prefix": "rcsession:",
"logErrors": true
},
// Configuration for express session (used for both passport and keycloak)
Expand Down
2 changes: 1 addition & 1 deletion demo/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@raincatcher/wfm-user": "0.0.5",
"bluebird": "^3.5.0",
"body-parser": "^1.17.2",
"connect-redis": "^3.3.0",
"connect-redis": "3.0.0",
"cookie-parser": "^1.4.3",
"cors": "^2.8.4",
"express": "^4.15.4",
Expand Down