Project Match
  • Getting Started (Local Server)
  • How to: Make A New Feature
    • Front End Setup
    • React Component Setup
    • Back End Setup
  • API
  • Git Guide
  • Deployment
  • Style Guide
    • Form Styling
    • Text Styling
    • Button Styling
    • Dropdown Styling
  • Git Pull Request Guide
    • Writing a Pull Request
    • Reviewing a Pull Request
Powered by GitBook
On this page
  • Login User
  • Register New User
  • Google Login
  • Logout User
  • Forgot Password
  • Reset Password
  • Get All Users
  • Get One User
  • Delete User
  • De-activates user
  • Activates user
  • Update User Data
  • Gets All Projects
  • Add New Project
  • Updates Project
  • Delete a Project
  • Upload Profile Image
  • Upload Project Cover Photo
  • Upload Project Revision Image

API

Login User

POST https://projectmatch.me/api/login

This endpoint allows users to login

Headers

Name
Type
Description

content-type

string

set to application/json

Request Body

Name
Type
Description

password

string

Password of user

email

string

Email of user

{
    "user": {
        "username": "prabbit",
        "status": true,
        "profileImage": "https://www.google.com",
        "_id": "5ad43ff2d6813a02b4afb999",
        "password": "$2a$10$aZcRatR7HO3WX.6j/9DxaetRI7KXhKly0O0x9BWmkcNOBcLbaWVOi",
        "email": "prabbit@gmail.com",
        "firstName": "Peter",
        "lastName": "Rabbit",
        "__v": 0
    },
    "userDetail": {
        "username": "prabbit",
        "location": "gardens",
        "roles": ["programmer"],
        "description": "hello this is peter, the rabbit!",
        "techstack": [
            "javascript",
            "HTML/CSS",
            "react",
        ],
        "projects": [
            "5ae2d7189b979d4cf889562"
        ],
        "bookmarked": [],
        "linkedInLink": "https://www.google.com",
        "githubLink": "https://www.google.com",
        "portfolioLink": "https://www.google.com",
        "websiteLink": "https://www.google.com",
        "twitterLink": "https://www.google.com",
        "blogLink": "https://www.blog.com",
        "_id": " 5ad43ff2d6813a02b4afb999",
        "__v": 10
    },
    "message": "Successfully logged in"
}
{
    "message": "User Not Found with Email"
}

Register New User

POST https://projectmatch.me/api/signup

This endpoint allows new users to register to site

Headers

Name
Type
Description

content-type

string

set to application/json

Request Body

Name
Type
Description

password

string

Password

email

string

Email

username

string

Username

lastName

string

Last Name

firstName

string

First Name

{
    "user": {
        "username": "prabbit",
        "status": true,
        "profileImage": "",
        "_id": "5aecb8f101c8580659c7bf80",
        "password": "$2a$10$WJHuTqKRSkv6LTzj3smCouHYLBnRNKKaws8UIq7cl3LvURpMQ6Iy.",
        "email": "prabbit@gmail.com",
        "firstName": "peter",
        "lastName": "rabbit",
        "__v": 0
    },
    "userDetail": null,
    "message": "User Registration Succesful"
}
{
    "message": "Missing credentials"
}

Google Login

POST https://projectmatch.me/api/googlelogin

Login with Google Authentication

Path Parameters

Name
Type
Description

idToken

string

idToken passed in from Google function

Headers

Name
Type
Description

content-type

string

application/json

Logout User

GET https://projectmatch.me/api/logout

Signs out current user

Forgot Password

POST https://projectmatch.me/api/forgot

Sends an email to passed in email parameter to start the process of re-setting the user password

Path Parameters

Name
Type
Description

email

string

email of user

Reset Password

POST https://projectmatch.me/api/reset/:token

Resets the password

Path Parameters

Name
Type
Description

token

string

Request Body

Name
Type
Description

string

Get All Users

GET https://projectmatch.me/api/users

Returns a list of all users

 

Get One User

GET https://projectmatch.me/api/user/:username

Returns individual user data

Path Parameters

Name
Type
Description

username

string

Delete User

POST https://projectmatch.me/api/user/delete

Deletes user

Request Body

Name
Type
Description

password

string

username

string

De-activates user

POST https://projectmatch.me/api/user/deactivate

De-activates user

Request Body

Name
Type
Description

password

string

username

string

Activates user

POST https://projectmatch.me/api/user/activate

Request Body

Name
Type
Description

username

string

password

string

Update User Data

POST https://projectmatch.me/api/user/update

Updates User Data

Request Body

Name
Type
Description

profileImage

string

email

string

lastName

string

firstName

string

blogLink

string

twitterLink

string

websiteLink

string

portfolioLink

string

githubLink

string

linkedInLink

string

bookmarked

array

techstack

array

description

string

roles

array

location

string

_id

string

Gets All Projects

GET https://projectmatch.me/api/projects

Get's all projects

Add New Project

POST https://projectmatch.me/api/projects/add

Adds new project

Request Body

Name
Type
Description

creator

string

contact

string

tags

array

category

string

status

boolean

lookingFor

array

liveLink

string

mockupLink

string

githubLink

string

team

array

dueDate

string

description

string

name

string

Updates Project

POST https://projectmatch.me/api/projects/update/:id

Updates project per _id parameter

Path Parameters

Name
Type
Description

id

string

project id

Request Body

Name
Type
Description

string

Delete a Project

DELETE https://projectmatch.me/api/projects/delete

Request Body

Name
Type
Description

id

string

project id

Upload Profile Image

POST https://projectmatch.me/api/image/profile

Uploads user profile image to AWS and saves it to corresponding user model

Path Parameters

Name
Type
Description

userName

string

Request Body

Name
Type
Description

string

Upload Project Cover Photo

POST https://projectmatch.me/api/image/project

Uploads project cover photo to AWS and saves it to corresponding project model

Path Parameters

Name
Type
Description

projectId

string

Request Body

Name
Type
Description

string

Upload Project Revision Image

POST https://projectmatch.me/api/image/revision

Uploads project revision images to AWS and saves it to corresponding revision model

Path Parameters

Name
Type
Description

revisionNumber

string

user

string

projectId

string

Request Body

Name
Type
Description

string

PreviousBack End SetupNextGit Guide

Last updated 7 years ago