Skip to content

Commit

Permalink
have to finish now!
Browse files Browse the repository at this point in the history
  • Loading branch information
haydnba committed May 18, 2018
1 parent d450a9e commit eca4a96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/test/controllers/report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const test = require('tape'); //eslint-disable-line
const request = require('supertest'); //eslint-disable-line
const router = require('../../app.js');

test.only('Test report GET route', (t) => {
test('Test report GET route', (t) => {
request(router)
.get('/report?challenge=3')
.expect(200)
Expand Down
3 changes: 2 additions & 1 deletion src/views/challenge.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<section>
<article>
<!-- below:- this needs to be resolved so that we can return either to home OR challenges -->
<a href="/challenges">Back</a>
<header>
<img src="/img/{{lowercase category}}.svg" alt="icon for {{category}}" height="60px" width="60px">
Expand All @@ -14,7 +15,7 @@
<footer>
<p>This challenge was added by
<img src="http://sigil.cupcake.io/{{username}}" height="50px" width="50px">{{username}} on {{added}}.</p>
<a href="/report?challenge={{id}}&referrer=challenge">Report an issue with this challenge</a>
<a href="/report?challenge={{id}}">Report an issue with this challenge</a>
</footer>
</article>
</section>
2 changes: 1 addition & 1 deletion src/views/home.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
</div>

<a href="/report?challenge={{id}}&referrer=home">Report an issue with this challenge</a>
<a href="/challenge/{{id}}?referrer=home">View more details for this challenge</a>

{{> modals }}

Expand Down
3 changes: 2 additions & 1 deletion src/views/report.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
</main>
</article>
<article>
<a href="/{{referrer}}/{{id}}">GO BACK</a>
{{!--
<a href="/{{referrer}}/{{id}}">GO BACK</a> --}}
<form action="/report" method="POST">
<fieldset>
<legend>Reporting Form</legend>
Expand Down

0 comments on commit eca4a96

Please sign in to comment.