From d4830be76b1a6f6240672bbe59cb1eae34d99050 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Mon, 16 Sep 2013 21:14:54 +0200 Subject: [PATCH] [MISC] Update NOTES file to reflect latest concept. --- NOTES | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/NOTES b/NOTES index 16a3e7e..f2db53b 100644 --- a/NOTES +++ b/NOTES @@ -1,4 +1,23 @@ Development notes +================= + +Session data +------------ + +This is a skeleton of what the session data within node.js will look like: + +req.session = { + "initialized": true, + "data": { + "user": {}, //see user document + "profile": {}, //see profile document .data attribute + "login": false, + "lastActivity": new Date().toString() + } +}; + + +Database documents ------------------ user document: @@ -19,8 +38,9 @@ profile document: } } + API ----- +--- GET retrieve data PUT put a whole dataset (overwrite) @@ -31,7 +51,7 @@ DELETE delete/destroy something GET /user {} {success, user: {%USER_DOCUMENT%}} PUT /user {username, password, email} {success} POST /user {username, password, email} {success} -DELETE /user {username, password} {success} +DELETE /user {} {success} GET /profile {} {success, profile: {%PROFILE_DOCUMENT}} PUT /profile {profile} {success}