public
/
ndcode_site.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b6b4073
)
Change /_lib/session_cookie.jst to /_lib/get_session.jst
author
Nick Downing
<nick@ndcode.org>
Sun, 23 Jan 2022 07:56:25 +0000
(18:56 +1100)
committer
Nick Downing
<nick@ndcode.org>
Sun, 23 Jan 2022 07:56:25 +0000
(18:56 +1100)
32 files changed:
_lib/get_session.jst
[moved from
_lib/session_cookie.jst
with 100% similarity]
patch
|
blob
|
history
_lib/page.jst
patch
|
blob
|
history
api/account/change_details/get.json.jst
patch
|
blob
|
history
api/account/change_details/get_draft.json.jst
patch
|
blob
|
history
api/account/change_details/set.json.jst
patch
|
blob
|
history
api/account/change_details/set_draft.json.jst
patch
|
blob
|
history
api/account/change_password.json.jst
patch
|
blob
|
history
api/account/password_reset.json.jst
patch
|
blob
|
history
api/account/sign_in.json.jst
patch
|
blob
|
history
api/account/sign_out.json.jst
patch
|
blob
|
history
api/account/sign_up/create_account.json.jst
patch
|
blob
|
history
api/account/sign_up/get_draft.json.jst
patch
|
blob
|
history
api/account/sign_up/send_email_verification_link.json.jst
patch
|
blob
|
history
api/account/sign_up/set_draft.json.jst
patch
|
blob
|
history
api/account/sign_up/verify_email.json.jst
patch
|
blob
|
history
api/account/verify_password.json.jst
patch
|
blob
|
history
api/contact/get_draft.json.jst
patch
|
blob
|
history
api/contact/send_enquiry.json.jst
patch
|
blob
|
history
api/contact/set_draft.json.jst
patch
|
blob
|
history
api/feedback.json.jst
patch
|
blob
|
history
api/globals/get.json.jst
patch
|
blob
|
history
api/globals/set.json.jst
patch
|
blob
|
history
api/nodemailer/get.json.jst
patch
|
blob
|
history
api/nodemailer/set.json.jst
patch
|
blob
|
history
api/verification_image.png.jst
patch
|
blob
|
history
contact/index.html.jst
patch
|
blob
|
history
my_account/index.html.jst
patch
|
blob
|
history
my_account/password_reset/index.html.jst
patch
|
blob
|
history
my_account/send_verification_email/index.html.jst
patch
|
blob
|
history
my_account/sign_up/index.html.jst
patch
|
blob
|
history
my_account/verify_email/index.html.jst
patch
|
blob
|
history
my_account/verify_password/index.html.jst
patch
|
blob
|
history
diff --git
a/_lib/session_cookie.jst
b/_lib/get_session.jst
similarity index 100%
rename from
_lib/session_cookie.jst
rename to
_lib/get_session.jst
diff --git
a/_lib/page.jst
b/_lib/page.jst
index
fecae38
..
1599f30
100644
(file)
--- a/
_lib/page.jst
+++ b/
_lib/page.jst
@@
-4,11
+4,11
@@
let crypto = require('crypto')
return async (env, head, body, scripts) => {
let favicons = await env.site.get_min_html('/_favicon/favicons.html')
return async (env, head, body, scripts) => {
let favicons = await env.site.get_min_html('/_favicon/favicons.html')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let pageview = await (
await (
let pageview = await (
await (
diff --git
a/api/account/change_details/get.json.jst
b/api/account/change_details/get.json.jst
index
cf450a8
..
8a1e74a
100644
(file)
--- a/
api/account/change_details/get.json.jst
+++ b/
api/account/change_details/get.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/account/change_details/get_draft.json.jst
b/api/account/change_details/get_draft.json.jst
index
b3058b3
..
41aa970
100644
(file)
--- a/
api/account/change_details/get_draft.json.jst
+++ b/
api/account/change_details/get_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let change_details_draft = await session.get('change_details_draft')
let details =
let change_details_draft = await session.get('change_details_draft')
let details =
diff --git
a/api/account/change_details/set.json.jst
b/api/account/change_details/set.json.jst
index
755f4c4
..
5a1bd43
100644
(file)
--- a/
api/account/change_details/set.json.jst
+++ b/
api/account/change_details/set.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-25,7
+25,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/account/change_details/set_draft.json.jst
b/api/account/change_details/set_draft.json.jst
index
69f1f5b
..
f6bc528
100644
(file)
--- a/
api/account/change_details/set_draft.json.jst
+++ b/
api/account/change_details/set_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-21,7
+21,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
if (details) {
let expires = new XDate()
if (details) {
let expires = new XDate()
diff --git
a/api/account/change_password.json.jst
b/api/account/change_password.json.jst
index
fbf7486
..
d75e91d
100644
(file)
--- a/
api/account/change_password.json.jst
+++ b/
api/account/change_password.json.jst
@@
-3,7
+3,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-24,7
+24,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/account/password_reset.json.jst
b/api/account/password_reset.json.jst
index
f652800
..
f22a687
100644
(file)
--- a/
api/account/password_reset.json.jst
+++ b/
api/account/password_reset.json.jst
@@
-4,7
+4,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-28,7
+28,7
@@
return async env => {
let given_names, family_name
try {
// initialize env.session_key, set cookie in env.response
let given_names, family_name
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
let account = await (
await (
let account = await (
await (
diff --git
a/api/account/sign_in.json.jst
b/api/account/sign_in.json.jst
index
ab7f4b8
..
a25211e
100644
(file)
--- a/
api/account/sign_in.json.jst
+++ b/
api/account/sign_in.json.jst
@@
-1,6
+1,6
@@
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-21,7
+21,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let account = await (
await (
let account = await (
await (
diff --git
a/api/account/sign_out.json.jst
b/api/account/sign_out.json.jst
index
120e568
..
a382816
100644
(file)
--- a/
api/account/sign_out.json.jst
+++ b/
api/account/sign_out.json.jst
@@
-1,6
+1,6
@@
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-11,7
+11,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
session.set('signed_in_as', null)
await transaction.commit()
session.set('signed_in_as', null)
await transaction.commit()
diff --git
a/api/account/sign_up/create_account.json.jst
b/api/account/sign_up/create_account.json.jst
index
613b1bd
..
4c30fc9
100644
(file)
--- a/
api/account/sign_up/create_account.json.jst
+++ b/
api/account/sign_up/create_account.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-33,7
+33,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let captcha = await session.get('captcha')
if (
let captcha = await session.get('captcha')
if (
diff --git
a/api/account/sign_up/get_draft.json.jst
b/api/account/sign_up/get_draft.json.jst
index
bd55bb3
..
db872bd
100644
(file)
--- a/
api/account/sign_up/get_draft.json.jst
+++ b/
api/account/sign_up/get_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let sign_up_draft = await session.get('sign_up_draft')
let details =
let sign_up_draft = await session.get('sign_up_draft')
let details =
diff --git
a/api/account/sign_up/send_email_verification_link.json.jst
b/api/account/sign_up/send_email_verification_link.json.jst
index
ac64ba5
..
314f174
100644
(file)
--- a/
api/account/sign_up/send_email_verification_link.json.jst
+++ b/
api/account/sign_up/send_email_verification_link.json.jst
@@
-4,7
+4,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-27,7
+27,7
@@
return async env => {
let given_names, family_name
try {
// initialize env.session_key, set cookie in env.response
let given_names, family_name
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
let account = await (
await (
let account = await (
await (
diff --git
a/api/account/sign_up/set_draft.json.jst
b/api/account/sign_up/set_draft.json.jst
index
c4b2e80
..
103c6ee
100644
(file)
--- a/
api/account/sign_up/set_draft.json.jst
+++ b/
api/account/sign_up/set_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-22,7
+22,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
if (details) {
let expires = new XDate()
if (details) {
let expires = new XDate()
diff --git
a/api/account/sign_up/verify_email.json.jst
b/api/account/sign_up/verify_email.json.jst
index
fe7d701
..
0e4a932
100644
(file)
--- a/
api/account/sign_up/verify_email.json.jst
+++ b/
api/account/sign_up/verify_email.json.jst
@@
-3,7
+3,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-24,7
+24,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
let account = await (
await (
let account = await (
await (
diff --git
a/api/account/verify_password.json.jst
b/api/account/verify_password.json.jst
index
1b65966
..
8f456ae
100644
(file)
--- a/
api/account/verify_password.json.jst
+++ b/
api/account/verify_password.json.jst
@@
-3,7
+3,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-24,7
+24,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
let account = await (
await (
let account = await (
await (
diff --git
a/api/contact/get_draft.json.jst
b/api/contact/get_draft.json.jst
index
95ddffc
..
4e55931
100644
(file)
--- a/
api/contact/get_draft.json.jst
+++ b/
api/contact/get_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let contact_draft = await session.get('contact_draft')
let details =
let contact_draft = await session.get('contact_draft')
let details =
diff --git
a/api/contact/send_enquiry.json.jst
b/api/contact/send_enquiry.json.jst
index
f1e5598
..
127bc7c
100644
(file)
--- a/
api/contact/send_enquiry.json.jst
+++ b/
api/contact/send_enquiry.json.jst
@@
-3,7
+3,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-34,7
+34,7
@@
return async env => {
let nodemailer_contact, contact_from, contact_to
try {
// initialize env.session_key, set cookie in env.response
let nodemailer_contact, contact_from, contact_to
try {
// initialize env.session_key, set cookie in env.response
-
session_cookie
(env, transaction)
+
get_session
(env, transaction)
let root = await transaction.get({})
nodemailer_contact = nodemailer.createTransport(
let root = await transaction.get({})
nodemailer_contact = nodemailer.createTransport(
diff --git
a/api/contact/set_draft.json.jst
b/api/contact/set_draft.json.jst
index
672c2fb
..
d0b19ea
100644
(file)
--- a/
api/contact/set_draft.json.jst
+++ b/
api/contact/set_draft.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-23,7
+23,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
if (details) {
let expires = new XDate()
if (details) {
let expires = new XDate()
diff --git
a/api/feedback.json.jst
b/api/feedback.json.jst
index
7cc4feb
..
e13452c
100644
(file)
--- a/
api/feedback.json.jst
+++ b/
api/feedback.json.jst
@@
-3,7
+3,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
await post_request(
// env
await post_request(
// env
@@
-24,7
+24,7
@@
return async env => {
let nodemailer_feedback, feedback_from, feedback_to
try {
// initialize env.session_key, set cookie in env.response
let nodemailer_feedback, feedback_from, feedback_to
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
let root = await transaction.get({})
nodemailer_feedback = nodemailer.createTransport(
let root = await transaction.get({})
nodemailer_feedback = nodemailer.createTransport(
diff --git
a/api/globals/get.json.jst
b/api/globals/get.json.jst
index
fb68ddb
..
04d64ed
100644
(file)
--- a/
api/globals/get.json.jst
+++ b/
api/globals/get.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/globals/set.json.jst
b/api/globals/set.json.jst
index
d8fc5be
..
fbb0127
100644
(file)
--- a/
api/globals/set.json.jst
+++ b/
api/globals/set.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-26,7
+26,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/nodemailer/get.json.jst
b/api/nodemailer/get.json.jst
index
6fcce8c
..
d2c8683
100644
(file)
--- a/
api/nodemailer/get.json.jst
+++ b/
api/nodemailer/get.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-13,7
+13,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/nodemailer/set.json.jst
b/api/nodemailer/set.json.jst
index
101a7fc
..
0ca4b66
100644
(file)
--- a/
api/nodemailer/set.json.jst
+++ b/
api/nodemailer/set.json.jst
@@
-2,7
+2,7
@@
let XDate = require('xdate')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
return async env => {
let post_request = await _require('/_lib/post_request.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let Problem = await _require('/_lib/Problem.jst')
await post_request(
let Problem = await _require('/_lib/Problem.jst')
await post_request(
@@
-16,7
+16,7
@@
return async env => {
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
try {
// initialize env.session_key, set cookie in env.response
- await
session_cookie
(env, transaction)
+ await
get_session
(env, transaction)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
if (env.signed_in_as === null)
throw new Problem('Unauthorized', 'Please sign in first.', 401)
diff --git
a/api/verification_image.png.jst
b/api/verification_image.png.jst
index
caa0ce5
..
c0bc7ed
100644
(file)
--- a/
api/verification_image.png.jst
+++ b/
api/verification_image.png.jst
@@
-3,14
+3,14
@@
let util = require('util')
let XDate = require('xdate')
return async env => {
let XDate = require('xdate')
return async env => {
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
let captcha = captchagen.create()
captcha.generate()
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
let captcha = captchagen.create()
captcha.generate()
// initialize env.session_key, set cookie in env.response
let transaction = await env.site.database.Transaction()
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
// store captcha text in the session for validation when form submitted
let expires = new XDate()
// store captcha text in the session for validation when form submitted
let expires = new XDate()
diff --git
a/contact/index.html.jst
b/contact/index.html.jst
index
8a39212
..
db92d12
100644
(file)
--- a/
contact/index.html.jst
+++ b/
contact/index.html.jst
@@
-5,13
+5,13
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let transaction = await env.site.database.Transaction(), draft_details
try {
// initialize env.session_key, set cookie in env.response
// preload draft details if any
let transaction = await env.site.database.Transaction(), draft_details
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let contact_draft = await session.get('contact_draft')
draft_details =
let contact_draft = await session.get('contact_draft')
draft_details =
diff --git
a/my_account/index.html.jst
b/my_account/index.html.jst
index
30dc0dc
..
4e88f56
100644
(file)
--- a/
my_account/index.html.jst
+++ b/
my_account/index.html.jst
@@
-6,7
+6,7
@@
return async env => {
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let menu = await env.site.get_menu('/my_account/_menu.json')
let navbar = await _require('/_lib/navbar.jst')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let menu = await env.site.get_menu('/my_account/_menu.json')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// see whether signed in, if so preload details, and draft details if any
let
// see whether signed in, if so preload details, and draft details if any
let
@@
-15,7
+15,7
@@
return async env => {
draft_details
try {
// initialize env.session_key, set cookie in env.response
draft_details
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
if (env.signed_in_as) {
account = await (
await (
if (env.signed_in_as) {
account = await (
await (
diff --git
a/my_account/password_reset/index.html.jst
b/my_account/password_reset/index.html.jst
index
0d9a07f
..
b66e431
100644
(file)
--- a/
my_account/password_reset/index.html.jst
+++ b/
my_account/password_reset/index.html.jst
@@
-5,7
+5,7
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let details = {}
// preload draft details if any
let details = {}
diff --git
a/my_account/send_verification_email/index.html.jst
b/my_account/send_verification_email/index.html.jst
index
10fb539
..
15793df
100644
(file)
--- a/
my_account/send_verification_email/index.html.jst
+++ b/
my_account/send_verification_email/index.html.jst
@@
-3,7
+3,7
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let details = {}
// preload draft details if any
let details = {}
diff --git
a/my_account/sign_up/index.html.jst
b/my_account/sign_up/index.html.jst
index
21862dc
..
10be9f6
100644
(file)
--- a/
my_account/sign_up/index.html.jst
+++ b/
my_account/sign_up/index.html.jst
@@
-5,13
+5,13
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let transaction = await env.site.database.Transaction(), draft_details
try {
// initialize env.session_key, set cookie in env.response
// preload draft details if any
let transaction = await env.site.database.Transaction(), draft_details
try {
// initialize env.session_key, set cookie in env.response
- let session = await
session_cookie
(env, transaction)
+ let session = await
get_session
(env, transaction)
let sign_up_draft = await session.get('sign_up_draft')
draft_details =
let sign_up_draft = await session.get('sign_up_draft')
draft_details =
diff --git
a/my_account/verify_email/index.html.jst
b/my_account/verify_email/index.html.jst
index
8f9fef0
..
63e9a1f
100644
(file)
--- a/
my_account/verify_email/index.html.jst
+++ b/
my_account/verify_email/index.html.jst
@@
-3,7
+3,7
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let details = {}
// preload draft details if any
let details = {}
diff --git
a/my_account/verify_password/index.html.jst
b/my_account/verify_password/index.html.jst
index
4c3fe7b
..
480db52
100644
(file)
--- a/
my_account/verify_password/index.html.jst
+++ b/
my_account/verify_password/index.html.jst
@@
-3,7
+3,7
@@
return async env => {
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
let icon_cross = await env.site.get_min_svg('/_svg/icon_cross.svg')
let icon_tick = await env.site.get_min_svg('/_svg/icon_tick.svg')
let navbar = await _require('/_lib/navbar.jst')
- let
session_cookie = await _require('/_lib/session_cookie
.jst')
+ let
get_session = await _require('/_lib/get_session
.jst')
// preload draft details if any
let details = {}
// preload draft details if any
let details = {}