Skip to content
Merged
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
6 changes: 3 additions & 3 deletions docs/labs/input2.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ <h2>Background</h2>

<p>
The code below sets up handlers for a <tt>get</tt> request on path
<tt>/invoices</tt>.
<tt>/parts</tt>.
This code could be triggered, for example, by requesting
<tt>http://localhost:3000/part?id=AX-794-7</tt>
<tt>http://localhost:3000/parts?id=AX-794-7</tt>
(if it was running at <tt>localhost</tt> and responding to port 3000).
If there are no validation errors, the code is supposed to show the part id.
If there is a validation error, it responds with HTTP
Expand Down Expand Up @@ -144,7 +144,7 @@ <h2>Interactive Lab (<span id="grade"></span>)</h2>
app.get('/parts',
<textarea id="attempt0" rows="2" cols="64" spellcheck="false">
,</textarea>
(req, res) =&gt; { // Execute this code if /invoices seen
(req, res) =&gt; { // Execute this code if /parts seen
const result = validationResult(req); // Retrieve errors
if (result.isEmpty()) { // No errors
const data = matchedData(req); // Retrieve matching data
Expand Down