Programmierpraktikum Soziale Netzwerke MERN Gruppe entwickelt eine Netzwerkplattform für die SKB
Im Laufe der Woche:
-
Treffen Montag 14 Uhr
-
Product Owner - Emre
-
Scrum Master - Luka
-
Quality-Assurance Manager - Jamina
-
Infrastructure Manager - Ahmed
SKB_Project$ npm install
client$ npm install
(eventuelle!!, should accually be done from the script)npm run dev
-npm test
The API consists of the following endpoints:
- POST
/account/singin
- POST
/account/singup
- GET
timeline/user/:email/course/article
Returns all Articles for the timeline, newes posts form the useres courses
-
GET
/user
Returns all users -
POST
/user
Creates a new user -
GET
/user/:email
Returns a specific user by username -
PUT
/user/:email
Updates a specific user by username -
DELETE
/user/:email
Deletes a specific user by username -
GET
/user/:email/course
Returns all courses of a user
-
GET
/userSession/:emailtoken
Returns the token of the userSession with your registered email -
POST
/userSession/check
Checks if User Sessoin is still active ---(if yes)---> updates the time stamp -
POST
/userSession/newtoken
Creates a new token for an expired User Session (body needs email) -
PUT
/userSession/deleteSession
Closes the User Session immediately
-
GET
/message
Returns all messages -
POST
/message
Creates a new massage -
GET
/message/from/:fromUser/to/:toUser
Returns all massages between two users
-
DELETE
/message/from/:fromUser/to/:toUser
Deletes a all massages between two users -
GET
/message/:_id
Returns one specific massage between two users -
DELETE
/message/:_id
Deletes one specific massage between two users
-
GET
/course
Returns all courses -
Post
/course
Creates a new course -
GET
/course/:name
Returns a specific courses by id -
PUT
/course/:name
Updates a specific course by id -
DELETE
/course/:name
Deletes a specific course by id -
GET
/course/:name/user
Returns all users of a course
-
GET
/article/course/:name
Returns all articles of a course -
Post
/article/course/:name
Creates a new article of a course -
GET
/article/:_id
Returns a specific article of a courses by aID -
PUT
/article/:_id
Updates a specific article of a course by aID -
DELETE
/article/:_id
Deletes a specific article of a course by aID
-
POST
enrollment/user/:email/course/:name
When a user signs in to a course -
DELETE
enrollment/user/:email/course/:name
When a user signs out of a course
-
GET
/group/course/:name
Returns all groups of a course -
Post
/group/course/:name
Creates a new goupe -
GET
/group/:_id
Returns a specific group from a specific courses by id -
PUT
/group/:_id
Updates a specific group from a specific course by id -
DELETE
/group/:_id
Deletes a specific group from a specific course by id
#DataObjects:
- all data Objects carry a _id
-
POST
/enrollment/user/:email/course/name
Enrolls a user in to a course -
DELETE
/enrollment/user/:email/course/name
Signeds a user out of a course
A user is a JSON Object like this:
{
"_id": "mongooseID",
"firstname": "firstname",
"lastname": "name",
"email": "email",
"password": "password",
"isTeacher": false,
"isAdmin": false,
"isVerified" : false
}
A message is a JSON Object like this:
{
"msgID": "id",
"fromUser": "username",
"toUser": "username",
"text": "",
"created_at": "date"
}
A course is a JSON Object like this:
{
"courseID": "id",
"name": "coursename",
"teacher": "username",
"description": ""
}
A article is a JSON Object like this:
{
"aID": "_id",
"course": "courseName",
"headline": "heading",
"author": "username",
"text": "",
"created_at": "date"
}
Response Object of our API Response is a JSON Object like this:
{
"success": "bool",
"message": "description"
}