fix: update urls to new version of project (#51)
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
This commit is contained in:
		
							parent
							
								
									045979ab01
								
							
						
					
					
						commit
						9eb0d63d53
					
				
					 1 changed files with 40 additions and 29 deletions
				
			
		|  | @ -1,35 +1,46 @@ | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
|  |   <head> | ||||||
|  |     <title>Exercise Tracker | freeCodeCamp</title> | ||||||
|  |     <link rel="shortcut icon" href="https://cdn.freecodecamp.org/universal/favicons/favicon-32x32.png" type="image/x-icon"/> | ||||||
|  |     <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css"> | ||||||
|  |     <link href="style.css" rel="stylesheet" type="text/css"> | ||||||
|  |   </head> | ||||||
| 
 | 
 | ||||||
|    <head> |   <body> | ||||||
|       <title>Exercise Tracker | Free Code Camp</title> |     <div class="container"> | ||||||
|       <link rel="shortcut icon" href="https://cdn.freecodecamp.org/universal/favicons/favicon-32x32.png" type="image/x-icon"/> |       <h1>Exercise tracker</h1> | ||||||
|       <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css"> |       <form action="/api/users" method="post"> | ||||||
|       <link href="style.css" rel="stylesheet" type="text/css"> |         <h3>Create a New User</h3> | ||||||
|    </head> |         <p><code>POST /api/users</code></p> | ||||||
|  |         <input id="uname" type="text" name="username" placeholder="username"> | ||||||
|  |         <input type="submit" value="Submit"> | ||||||
|  |       </form> | ||||||
|  |       <form id="exercise-form" method="post"> | ||||||
|  |         <h3>Add exercises</h3> | ||||||
|  |         <p><code>POST /api/users/:_id/exercises</code></p> | ||||||
|  |         <input id="uid" type="text" name=":_id" placeholder=":_id"> | ||||||
|  |         <input id="desc" type="text" name="description" placeholder="description*"> | ||||||
|  |         <input id="dur" type="text" name="duration" placeholder="duration* (mins.)"> | ||||||
|  |         <input id="dat" type="text" name="date" placeholder="date (yyyy-mm-dd)"> | ||||||
|  |         <input type="submit" value="Submit"> | ||||||
|  |       </form> | ||||||
|  |       <p> | ||||||
|  |         <strong>GET user's exercise log: </strong> | ||||||
|  |         <code>GET /api/users/:_id/logs?[&from][&to][&limit]</code> | ||||||
|  |       </p> | ||||||
|  |       <p><strong>[ ]</strong> = optional</p> | ||||||
|  |       <p><strong>from, to</strong> = dates (yyyy-mm-dd); <strong>limit</strong> = number</p> | ||||||
|  |     </div> | ||||||
|  |     <script> | ||||||
|  |       const exerciseForm = document.getElementById("exercise-form"); | ||||||
| 
 | 
 | ||||||
|    <body> |       exerciseForm.addEventListener("submit", () => { | ||||||
|       <div class="container"> |         const userId = document.getElementById("uid").value; | ||||||
|          <h1>Exercise tracker</h1> |         exerciseForm.action = `/api/users/${userId}/exercises`; | ||||||
|           <form action="/api/exercise/new-user" method="post"> |  | ||||||
|             <h3>Create a New User</h3> |  | ||||||
|             <p><code>POST /api/exercise/new-user</code></p> |  | ||||||
|             <input id="uname" type="text" name="username" placeholder="username"> |  | ||||||
|             <input type="submit" value="Submit"> |  | ||||||
|           </form> |  | ||||||
|           <form action="/api/exercise/add" method="post"> |  | ||||||
|             <h3>Add exercises</h3> |  | ||||||
|             <p><code>POST /api/exercise/add</code></p> |  | ||||||
|             <input id="uid" type="text" name="userId" placeholder="userId*"> |  | ||||||
|             <input id="desc" type="text" name="description" placeholder="description*"> |  | ||||||
|             <input id="dur" type="text" name="duration" placeholder="duration* (mins.)"> |  | ||||||
|             <input id="dat" type="text" name="date" placeholder="date (yyyy-mm-dd)"> |  | ||||||
|             <input type="submit" value="Submit"> |  | ||||||
|           </form> |  | ||||||
|           <p><strong>GET users's exercise log: </strong><code>GET /api/exercise/log?{userId}[&from][&to][&limit]</code></p> |  | ||||||
|           <p><strong>{ }</strong> = required, <strong>[ ]</strong> = optional</p> |  | ||||||
|           <p><strong>from, to</strong> = dates (yyyy-mm-dd); <strong>limit</strong> = number</p> |  | ||||||
|       </div> |  | ||||||
|    </body> |  | ||||||
| 
 | 
 | ||||||
|  |         exerciseForm.submit(); | ||||||
|  |       }); | ||||||
|  |     </script> | ||||||
|  |   </body> | ||||||
| </html> | </html> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue