aboutsummaryrefslogtreecommitdiffstats
path: root/hocs/withSession.js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2021-09-06 23:13:22 +0200
committerGravatar piotrruss <mail@pruss.it> 2021-09-06 23:13:22 +0200
commit569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a (patch)
tree8d1cb94a56d60b9d726222277b7516fc59895613 /hocs/withSession.js
parent275bd1d0a9aea90696c145cf992d522a0d6b0aa8 (diff)
downloadmy_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.gz
my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.bz2
my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.zip
added stadard linter
Diffstat (limited to 'hocs/withSession.js')
-rw-r--r--hocs/withSession.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/hocs/withSession.js b/hocs/withSession.js
index 0361db3..fc8f40d 100644
--- a/hocs/withSession.js
+++ b/hocs/withSession.js
@@ -1,14 +1,14 @@
// this file is a wrapper with defaults to be used in both API routes and `getServerSideProps` functions
-import {withIronSession} from 'next-iron-session'
+import { withIronSession } from 'next-iron-session'
-export default function withSession(handler) {
+export default function withSession (handler) {
return withIronSession(handler, {
password: process.env.MYAPPS_SECRET_COOKIE_PASSWORD,
cookieName: 'myapps_session',
cookieOptions: {
// the next line allows to use the session in non-https environments like
// Next.js dev mode (http://localhost:3000)
- secure: process.env.NODE_ENV === 'production' ? true : false,
- },
+ secure: process.env.NODE_ENV === 'production'
+ }
})
}