Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First table edit, added bootstrap #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 72 additions & 77 deletions src/docs/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td,
th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
<title>Documentation</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>

tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
<h2>Available Routes</h2>
<table>
<h2 style="text-align: center; padding: 20px;">Available Routes</h2>

<div class=" container table-responsive">

<table class="table table-striped thead-dark" >
<tr>
<th>TYPE</th>
<th>ROUTE</th>
Expand All @@ -34,247 +25,251 @@ <h2>Available Routes</h2>
<td>[POST]/api/register</td>
<td>{name:'',email:'',password:''}</td>
<td>{token:''}</td>
<th>Accepts name,email and password and return json token</th>
<td>Accepts name,email and password and return json token</td>
</tr>
<tr>
<td rowspan="2">LOGIN</td>
<td>[POST]/api/login</td>
<td>{email:'',password:''}</td>
<td>{token:''}</td>
<th>Accepts email and password and return json token</th>
<td>Accepts email and password and return json token</td>
</tr>
<tr>
<td>[GET]/api/login</td>
<td>[header]x-auth-token:''</td>
<td>{userModel}</td>
<th>Accepts token as header and returns the user data</th>
<td>Accepts token as header and returns the user data</td>
</tr>
<tr>
<td rowspan="3">CONTACT US</td>
<td>[POST]/api/contact</td>
<td>{email:'',name:'',contact:'',query:''}</td>
<td>{msg:''}</td>
<th>
<td>
Accepts email,contact,name,query and return the error or success
message
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/contact</td>
<td>[header]x-auth-token:''</td>
<td>{msg:''}</td>
<th>
<td>
Accepts token(with admin access) as header and returns error or
success message
</th>
</td>
</tr>
<tr>
<td>[GET]/api/contact</td>
<td>[header]x-auth-token:''</td>
<td>[contactModel]</td>
<th>
<td>
Accepts token(with admin access) as header and returns array of
contactModel
</th>
</td>
</tr>
<!-- Events -->
<tr>
<td rowspan="7">Events</td>
<td>[GET]/api/events</td>
<td>{}</td>
<td>{List of events}</td>
<th>
<td>
Accepts nothing and returns the list of events or error
</th>
</td>
</tr>
<tr>
<td>[GET]/api/events/:eventId</td>
<td>{}</td>
<td>{Details of a specific event}</td>
<th>
<td>
Accepts eventId as a url parameter and returns specific event details
or error message.
</th>
</td>
</tr>
<tr>
<td>[GET]/api/events/participants/:eventId</td>
<td>{}</td>
<td>{[Array of participants of spefific event]}</td>
<th>
<td>
Accepts eventId as url parameter and returns an Array of Participants
or error message.
</th>
</td>
</tr>
<tr>
<td>[POST]/api/events/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success or
error message.
</th>
</td>
</tr>
<tr>
<td>[PUT]/api/events/register/:eventId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
[User Event Registration] Accepts token as header and returns
successful registration or error message.
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/events/delete/:eventId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
event is deleted or error message.
</th>
</td>
</tr>
<tr>
<td>[PUT]/api/events/update/:eventId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
event is updated or error message.
</th>
</td>
</tr>
<!-- Groups -->
<tr>
<td rowspan="3">Groups</td>
<td>[GET]/api/groups</td>
<td>{}</td>
<td>{List of available groups}</td>
<th>
<td>
Accepts nothing and returns list of groups with details or error
message.
</th>
</td>
</tr>
<tr>
<td>[POST]/api/groups/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
group is added or error message.
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/groups/delete/:groupId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
group is deleted or error message.
</th>
</td>
</tr>
<!--Team-->
<tr>
<td rowspan="4">Team</td>
<td>[GET]/api/team</td>
<td>{}</td>
<td>{List of Team Members}</td>
<th>
<td>
Accepts nothing and returns list of team members with details or error
message.
</th>
</td>
</tr>
<tr>
<td>[POST]/api/team/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
team member is added or error message.
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/team/delete/:memberId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
<td>
Accepts token(witd admin access) as header and returns success if
team member is deleted or error message.
</th>
</td>
</tr>
<tr>
<td>[PUT]/api/team/update/:memberId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
team member is updated or error message.
</th>
</td>
</tr>
<!--Projects-->
<tr>
<td rowspan="4">Projects</td>
<td>[GET]/api/projects</td>
<td>{}</td>
<td>{List of Projects}</td>
<th>
<td>
Accepts nothing and returns list of projects with details or error
message.
</th>
</td>
</tr>
<tr>
<td>[POST]/api/projects/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
project is added or error message.
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/project/delete/:projectId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
project is deleted or error message.
</th>
</td>
</tr>
<tr>
<td>[PUT]/api/project/update/:proectId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
<td>
Accepts token(with admin access) as header and returns success if
project is updated or error message.
</th>
</td>
</tr>
<!--Achievements-->
<tr>
<td rowspan="3">Achievements</td>
<td>[GET]/api/achievements</td>
<td>{}</td>
<td>{List of Achievements}</td>
<th>
<td>
Accepts nothing and returns list of achievements with details or error
message.
</th>
</td>
</tr>
<tr>
<td>[POST]/api/achievements/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
<td>
Accepts token(witd admin access) as header and returns success if
achievement is added or error message.
</th>
</td>
</tr>
<tr>
<td>[DELETE]/api/achievement/delete/:achievementId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
<td>
Accepts token(witd admin access) as header and returns success if
achievement is deleted or error message.
</th>
</td>
</tr>
</table>
</body>


</div>

</body>
</html>