You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.
Make sure that every route includes the user UUID in the header
/api/post
GET (retrieves contents of a post)
POST (uploads a post to the backend)
PUT (updates property of a post)
DELETE (deletes a post)
/api/post/follow
POST (either adds or removes user from post's following list)
Request: postUUID
Response:
Success: "Added user as a follower" or "Removed user as a follower"
Failure: json object with the following:
{
status: Number,
error: String
}
/api/user
GET (gets user data)
Request - nothing needed
Response - JSON of the User Obj
POST (creates a user)
Request (Body):
{
name: String,
email: String,
uuid: String
}
Response:
Success: 200 status - "Added user __"
Failure: json object with the following:
{
status: Number,
error: String
}
Request - nothing needed
Response - "Removed user from the database"
/api/user/:courseID
GET (gets user's type in a course)
Request - nothing needed
Response - JSON object
// "type" field shows if user is in course, "error" field shows if user is NOT in course
{
type: "Instructor" or "Student",
error: "Error Message"
}
POST (adds user to a given course) --> still needs ability to add instructor
Request - Body
{
"type": "Instructor" or "Student"
}
Response
Success - "Added user to course"
Failure - JSON object
{
status: Number,
error: "String
}
PATCH (updates user's status in a course)
/api/course
GET (all courses to join)
Request - nothing needed
Response - JSON object
{
"courseId": {
// course information
},
"courseId2": {
// course information for cousreId2
},
...
}
POST (creates a course)
PATCH (updates properties of a course)
/api/course/:courseID
GET (course information about given course, data given should differ based on whether user is a student or instructor)
for the GET request of /api/course, I think it'd be great if we can manipulate our data so that we also include what type of user they are in the given course (taking the logic of the GET for /api/user/:courseID and applying it here as well). That way, only one backend call will be needed
Make sure that every route includes the user UUID in the header
/api/post
/api/post/follow
/api/user
/api/user/:courseID
/api/course
/api/course/:courseID
/api/course/:courseId/invite
/api/comment/
/api/tag/
The text was updated successfully, but these errors were encountered: