@goweekdays/core 2.11.9 → 2.11.10
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/CHANGELOG.md +6 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -633,7 +633,10 @@ function useAuthService() {
|
|
|
633
633
|
if (!isPasswordValid) {
|
|
634
634
|
throw new import_utils2.BadRequestError("Invalid password");
|
|
635
635
|
}
|
|
636
|
-
const { setCache } = (0, import_utils2.useCache)(
|
|
636
|
+
const { setCache, delNamespace } = (0, import_utils2.useCache)(
|
|
637
|
+
`user:${_user._id?.toString()}`
|
|
638
|
+
);
|
|
639
|
+
await delNamespace();
|
|
637
640
|
const sid = v4_default();
|
|
638
641
|
const cacheKey = `sid:${sid}`;
|
|
639
642
|
await setCache(cacheKey, _user, 14400);
|
|
@@ -11173,7 +11176,7 @@ function useAuthController() {
|
|
|
11173
11176
|
}
|
|
11174
11177
|
}
|
|
11175
11178
|
async function logout(req, res, next) {
|
|
11176
|
-
const user = req.
|
|
11179
|
+
const user = req.cookies.user;
|
|
11177
11180
|
if (!user) {
|
|
11178
11181
|
next(new import_utils54.BadRequestError("Failed to identify user from request."));
|
|
11179
11182
|
return;
|