Skip to content

Kevw94/api_back_end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api_back_end

ENDPOINTS

CONNECTION

POST: /SIGNUP

POST: /LOGIN


USERS

GET: /USERS/ME

PATCH: /USERS/ME

GET: /USERS/:ID

PATCH: /USERS/ME/PASSWORD


POSTS

PATCH: /POST/:ID

POST: /POSTS/

DELETE: /POST/:ID

GET: /POSTS

GET: /POST/ME


FOLLOWERS

GET: /POSTS/FOLLOWERS/ME

POST: /FOLLOWERS

GET: /FOLLOWERS/ME

GET: /FOLLOWERS/FOLLOWING

DELETE: /FOLLOWERS/:ID


LIKES

POST: /LIKES/:ID

GET: /LIKES/POSTS/ME

GET: /LIKES/POSTS/:ID

DELETE: /LIKES/:ID


POSTS

POST: /MESSAGES/

GET: /MESSAGES/:ID/:


COMMENTS

POST: /COMMENTS

GET: /COMMENTS/POSTS/:ID

PATCH: /COMMENTS/:ID

GET: /COMMENTS/ME

DELETE: /COMMENTS/:ID

RESPONSE FROM DB

USER

{ "id": ObjectId(), "username": String, "password": String, "createdAt": Date, }


POSTS

{ "id": ObjectId(), "userId": ObjectId(), "content": String, "createdAt": Date, }


LIKES

{ "id": ObjectId(), "postId": ObjectId(), "userId": ObjectId(), "createdAt": Date, }


COMMENTS

{ "id": ObjectId(), "postId": ObjectId(), "userId": ObjectId(), "content": String "createdAt": Date, }


FOLLOWERS

{ "id": ObjectId(), "userId": ObjectId(), "followingId": ObjectId(), "createdAt": Date, }


MESSAGES

{ "id": ObjectId(), "talkId": ObjectId(), "senderId": ObjectId(), "receiverId": ObjectId(), "content": String, "createdAt": Date, }

-------------------------------------

SEND TO BACK

USER

{ "username": String, "password": String, }

POSTS

{ "userId": ObjectId(), "content": String, }

LIKES

{ "postId": ObjectId(), "userId": ObjectId(), }

COMMENTS

{ "postId": ObjectId(), "userId": ObjectId(), "content": String }

FOLLOWERS

{ "userId": ObjectId(), "followingId": ObjectId(), }

MESSAGES

{ "talkId": ObjectId(), "senderId": ObjectId(), "receiverId": ObjectId(), "content": String, }

-------------------------------

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages