Skip to content

Instantly share code, notes, and snippets.

1. Introduction and Background
1.1 Statement of Problem Area
1.2 Previous and Current Work, Methods and Procedures
1.3 Background
1.4 Brief Project Description
1.5 Purpose/Objectives/justification of Project
1.6 Team work assignment and accomplished
2. System Functional Specification
2.1 Functions Performed
2.2 User Interface Design
## Create a new user
### URL: http://paysdu42.fr:2048/api/v1/users?lang=en
### POST data: &lang=en&login=db0&email=db0lol@gmail.com&password=helloworld&firstname=Barbara&lastname=Lepage&gender=female&birthday=1991-05-30
### Content received:
{
"error": {
"code": 9000,
"type": "IOErrorDB",
"message": {
"message": "Cast to date failed for value \"1991-05-30;�R�\" at path \"birthday\"",
## Create a new user
## URL: http://paysdu42.fr:2048/api/v1/users?ang=en
## POST data: lang=en&login=db0&email=db0lol@gmail.com&password=helloworld&firstname=Barbara&lastname=Lepage&gender=female&birthday=1991-05-30
## Content received:
{
"error": null,
"element": {
"__v": 0,
"login": "db0",
"firstname": "Barbara",
#include <stdlib.h>
#include <unistd.h>
enum casem
{
EMPTY,
ROND,
CROIX
};
## Get users
## URL: http://paysdu42.fr:2048/api/v1/users?limit=2&term=a
## POST data:
## Content received:
{
"error": null,
"element": {
"server_size": 56,
"index": 0,
"limit": "2",
## Get achievements without being logged in
## URL: http://paysdu42.fr:2048/api/v1/achievements?lang=en
## POST data:
## Content received:
{
"error": null,
"element": {
db0@sd-22913:~/www/poney/eipapi/API$ git diff models/User.js
diff --git a/models/User.js b/models/User.js
index 7b8eb47..917b340 100644
--- a/models/User.js
+++ b/models/User.js
@@ -40,6 +40,10 @@ UserSchema.options.toJSON = {
virtuals: true
});
+ obj.birthday = "2006-01-02"; // tmp fix
## Get an authentication token using this user
## URL: http://paysdu42.fr:2048/api/v1/tokens
## POST data: login=0onms&password=helloworld
## Content received:
{
"error": null,
"element": {
"modification": "2013-05-29T20:41:21Z",
"user": "51a667f18a3cba7913000001",
"token": "0onms-421946590-1370464881303",
## Get my own authentication tokens
## URL: http://paysdu42.fr:2048/api/v1/tokens
## POST data:
## Content received:
TypeError: Cannot read property 'user' of undefined
at module.exports (/var/www/poney/eipapi/API/controllers/TokenController.js:32:80)
at forEach.LifeRouter.(anonymous function) (/var/www/poney/eipapi/API/wrappers/LifeRouter.js:50:36)
at Function.LifeSecurity.authenticationWrapper (/var/www/poney/eipapi/API/wrappers/LifeSecurity.js:59:16)
at forEach.LifeRouter.(anonymous function) (/var/www/poney/eipapi/API/wrappers/LifeRouter.js:41:41)
at callbacks (/var/www/poney/eipapi/API/node_modules/express/lib/router/index.js:161:37)
Connecting as a:a
/var/www/return/api/intra.js:26
set_cookies.forEach(function(c) {
^
TypeError: Cannot call method 'forEach' of undefined
at Request._callback (/var/www/return/api/intra.js:26:14)
at Request.init.self.callback (/var/www/return/api/node_modules/request/main.js:127:22)
at Request.EventEmitter.emit (events.js:99:17)
at Request.<anonymous> (/var/www/return/api/node_modules/request/main.js:767:16)