Skip to content
Permalink
Browse files
Fix issues with routes
The category by tag route stored a variable which all other routes. This
impacted the whole team dramatically.
  • Loading branch information
sarkarj committed Dec 2, 2019
1 parent f0e0cd1 commit 0965d5937bdc7215577cbdee17df8d0c1895c41a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
@@ -71,7 +71,7 @@ router.get('/edit/:id', async ctx => {

router.post('/edit', koaBody, async ctx => await editPost(ctx, dbName))

router.get('/:tag', async ctx => await categoriesTagGet(ctx, dbName))
router.get('/categories/:tag', async ctx => await categoriesTagGet(ctx, dbName))

/**
* The user registration page.
BIN +3.81 KB (110%) public/articleImages/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +174 KB (470%) public/articleImages/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
@@ -16,11 +16,11 @@
<section class="dropdown">
<button class="dropdownBtn">CATEGORIES</button>
<section name="categories" class="dropdownContent">
<a href="/sport">Sport</a>
<a href="/science">Science</a>
<a href="/tech">Tech</a>
<a href="/world">World</a>
<a href="/politics">Politics</a>
<a href="/categories/sport">Sport</a>
<a href="/categories/science">Science</a>
<a href="/categories/tech">Tech</a>
<a href="/categories/world">World</a>
<a href="/categories/politics">Politics</a>
</section>
</section>

@@ -48,7 +48,7 @@
<article class="card">
<a href="/articles/{{this.article_id}}"><h2> {{this.title}}</h2></a>
<h5> {{this.summary}}</h5>
<a href="/articles/{{this.article_id}}"><img src = "{{this.image_url}}" style="height:200px;"></a>
<a href="/articles/{{this.article_id}}"><img src = "../{{this.image_url}}" style="height:200px;"></a>
<h5> by {{this.author}} </h5>
<h6> tag: {{this.tag}} </h6>
<p> Average Rating: </p>

0 comments on commit 0965d59

Please sign in to comment.