[MISC] Update NOTES file to reflect latest concept.
This commit is contained in:
parent
e0b6d7f175
commit
d4830be76b
24
NOTES
24
NOTES
@ -1,4 +1,23 @@
|
|||||||
Development notes
|
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:
|
user document:
|
||||||
@ -19,8 +38,9 @@ profile document:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
API
|
API
|
||||||
----
|
---
|
||||||
|
|
||||||
GET retrieve data
|
GET retrieve data
|
||||||
PUT put a whole dataset (overwrite)
|
PUT put a whole dataset (overwrite)
|
||||||
@ -31,7 +51,7 @@ DELETE delete/destroy something
|
|||||||
GET /user {} {success, user: {%USER_DOCUMENT%}}
|
GET /user {} {success, user: {%USER_DOCUMENT%}}
|
||||||
PUT /user {username, password, email} {success}
|
PUT /user {username, password, email} {success}
|
||||||
POST /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}}
|
GET /profile {} {success, profile: {%PROFILE_DOCUMENT}}
|
||||||
PUT /profile {profile} {success}
|
PUT /profile {profile} {success}
|
||||||
|
Loading…
Reference in New Issue
Block a user