@duvdu-v1/duvdu 1.1.62 → 1.1.64
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.
|
@@ -289,4 +289,4 @@ export declare const redisConnection: (url: string, password: string) => Promise
|
|
|
289
289
|
reserve: typeof import("@redis/bloom/dist/commands/top-k/RESERVE");
|
|
290
290
|
};
|
|
291
291
|
} & import("redis").RedisModules, import("redis").RedisFunctions, import("redis").RedisScripts>>;
|
|
292
|
-
export declare const sessionStore: (url: string, password: string) => RedisStore
|
|
292
|
+
export declare const sessionStore: (url: string, password: string) => Promise<RedisStore>;
|
|
@@ -17,15 +17,20 @@ const connect_redis_1 = __importDefault(require("connect-redis"));
|
|
|
17
17
|
const redis_1 = require("redis");
|
|
18
18
|
const data_base_connections_1 = require("../errors/data-base-connections");
|
|
19
19
|
const redisConnection = (url, password) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.connect()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
try {
|
|
21
|
+
const client = (0, redis_1.createClient)({ url, password });
|
|
22
|
+
yield client.connect();
|
|
23
|
+
console.log(`Redis connected in : ${url}`);
|
|
24
|
+
return client;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
console.error(`Cannot connect to Redis: ${url}`, error);
|
|
28
|
+
throw new data_base_connections_1.DatabaseConnectionError(`Cannot connect to Redis: ${url}`);
|
|
29
|
+
}
|
|
28
30
|
});
|
|
29
31
|
exports.redisConnection = redisConnection;
|
|
30
|
-
const sessionStore = (url, password) =>
|
|
32
|
+
const sessionStore = (url, password) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
const client = yield (0, exports.redisConnection)(url, password);
|
|
34
|
+
return new connect_redis_1.default({ client });
|
|
35
|
+
});
|
|
31
36
|
exports.sessionStore = sessionStore;
|
|
@@ -53,7 +53,6 @@ export interface IteamProject extends Document {
|
|
|
53
53
|
}
|
|
54
54
|
];
|
|
55
55
|
isDeleted: boolean;
|
|
56
|
-
showOnHome: boolean;
|
|
57
56
|
}
|
|
58
57
|
export declare const TeamProject: import("mongoose").Model<IteamProject, {}, {}, {}, Document<unknown, {}, IteamProject> & IteamProject & {
|
|
59
58
|
_id: Types.ObjectId;
|
|
@@ -94,10 +94,6 @@ exports.TeamProject = (0, mongoose_1.model)(model_names_1.MODELS.teamProject, ne
|
|
|
94
94
|
isDeleted: {
|
|
95
95
|
type: Boolean,
|
|
96
96
|
default: false
|
|
97
|
-
},
|
|
98
|
-
showOnHome: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: true
|
|
101
97
|
}
|
|
102
98
|
}, { timestamps: true, collection: model_names_1.MODELS.teamProject,
|
|
103
99
|
toJSON: {
|