mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
✨ Parse bigints as integers.
This commit is contained in:
parent
af478c83cd
commit
1c098d9b04
2 changed files with 7 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
(defn- derive-tokens-secret
|
||||
[key]
|
||||
(when (= key "default")
|
||||
(log/warn "Using default APP_SECRET_KEY, the system will generate insecure tokens."))
|
||||
(log/warn "Using default PENPOT_SECRET_KEY, the system will generate insecure tokens."))
|
||||
(let [engine (bk/engine {:key key
|
||||
:salt "tokens"
|
||||
:alg :hkdf
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
|
||||
;; --- Transit adapters
|
||||
|
||||
(def bigint-read-handler
|
||||
(t/read-handler
|
||||
(fn [value]
|
||||
(js/parseInt value 10))))
|
||||
|
||||
(def point-write-handler
|
||||
(t/write-handler
|
||||
(constantly "point")
|
||||
|
@ -69,6 +74,7 @@
|
|||
|
||||
(def ^:privare +read-handlers+
|
||||
{"u" uuid
|
||||
"n" bigint-read-handler
|
||||
"ordered-set" ordered-set-read-handler
|
||||
"jsonblob" blob-read-handler
|
||||
"matrix" matrix-read-handler
|
||||
|
|
Loading…
Add table
Reference in a new issue