TEAM WORK

Teamwork is an internal social network for employees of an organization.
GitHub Built by Kodekage

API Overview


  • Admin can create an employee user account.
  • Admin/Employees can sign in.
  • Employees can post gifs.
  • Employees can write and post articles.
  • Employees can edit their articles.
  • Employees can delete their articles.
  • Employees can delete their gifs post.
  • Employees can comment on other colleagues' article post.
  • Employees can comment on other colleagues' gif post.
  • Employees can view all articles and gifs, showing the most recently posted articles or gifs first.
  • Employees can view a specific article.
  • Employees can view a specific gif post.

API endpoint documentation


# Register Users

Making a POST request to this endpoint creates an admin/employee account.

Make sure to specify if user is an admin/employee in the jobrole key of your JSON body payload
# sample request body

{
   "firstname" : "Praise",
   "lastname" : "Friday",
   "email" : "fiday@gmail.com",
   "password" : "hisquare",
   "gender" : "male",
   "jobrole" : "employee",
   "department" : "IT",
   "address" : "umuahia"
}

# Login Users

Making a POST request to this endpoint logs users in.

# sample request body

{
   "email" : "fiday@gmail.com",
   "password" : "hisquare",
}

# List all users

Making a GET request to this endpoint lists all registered users.

Make sure to add the token generated from login in the Authorization header and only an admin user can use this endpoint

# Create articles

Making a POST request to this endpoint stores user article to the DB.

Make sure to add the token generated from login in the Authorization header.
# sample request body

{
   "title" : "Introduction to Teamwork",
   "article" : "Teamwork is an internal social network for employees of an organization.",
}