mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-29 15:51:35 +00:00
Add settings restore link
This commit is contained in:
parent
21875a8e83
commit
0c16c027e9
4 changed files with 34 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const crypto = require("crypto")
|
||||
const {parse} = require("cookie")
|
||||
const {parse: parseCookie} = require("cookie")
|
||||
|
||||
const constants = require("../../../lib/constants")
|
||||
const db = require("../../../lib/db")
|
||||
|
|
@ -22,7 +22,7 @@ function addDefaults(input = {}) {
|
|||
|
||||
function getToken(req) {
|
||||
if (!req.headers.cookie) return null
|
||||
const cookie = parse(req.headers.cookie)
|
||||
const cookie = parseCookie(req.headers.cookie)
|
||||
const token = cookie.settings
|
||||
if (token) return token
|
||||
else return null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue