fastify-session-better-sqlite3-store 1.0.9 → 1.0.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/README.md +0 -6
- package/index.js +3 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -37,12 +37,6 @@ fastify.register(fastifySession, {
|
|
|
37
37
|
|
|
38
38
|
-----
|
|
39
39
|
|
|
40
|
-
## Package-Status
|
|
41
|
-
|
|
42
|
-
*premature, there are a lot of rooms for improvement*
|
|
43
|
-
|
|
44
|
-
-----
|
|
45
|
-
|
|
46
40
|
## License
|
|
47
41
|
|
|
48
42
|
[MIT Licence](https://github.com/mrdcvlsc/fastify-session-better-sqlite3-store/blob/main/LICENSE)
|
package/index.js
CHANGED
|
@@ -40,7 +40,7 @@ SqliteStore.prototype.set = function set (sessionId, session, callback) {
|
|
|
40
40
|
try {
|
|
41
41
|
this.setSession.run(
|
|
42
42
|
sessionId,
|
|
43
|
-
session.
|
|
43
|
+
session.cookie._expires.toISOString(),
|
|
44
44
|
JSON.stringify(session)
|
|
45
45
|
)
|
|
46
46
|
callback(null)
|
|
@@ -63,8 +63,8 @@ SqliteStore.prototype.get = function get (sessionId, callback) {
|
|
|
63
63
|
let session = null
|
|
64
64
|
if (results.length === 1) {
|
|
65
65
|
const found = JSON.parse(results[0].session)
|
|
66
|
-
if (found.expires) {
|
|
67
|
-
if (new Date() < new Date(found.expires)) {
|
|
66
|
+
if (found.cookie.expires) {
|
|
67
|
+
if (new Date() < new Date(found.cookie.expires)) {
|
|
68
68
|
session = found
|
|
69
69
|
}
|
|
70
70
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastify-session-better-sqlite3-store",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "A simple session store for fastify-session using better-sqlite3",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"author": "mrdcvlsc",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fastify/cookie": "^
|
|
27
|
-
"@fastify/session": "^
|
|
28
|
-
"better-sqlite3": "^
|
|
29
|
-
"fastify": "^4.
|
|
30
|
-
"standard": "^17.
|
|
26
|
+
"@fastify/cookie": "^9.0.4",
|
|
27
|
+
"@fastify/session": "^10.4.0",
|
|
28
|
+
"better-sqlite3": "^8.5.0",
|
|
29
|
+
"fastify": "^4.21.0",
|
|
30
|
+
"standard": "^17.1.0"
|
|
31
31
|
}
|
|
32
32
|
}
|