Skip to content

Commit

Permalink
changes to merge so it works
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhtarAkle committed May 12, 2023
1 parent 7313bb4 commit fa92f0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ router.get('/', function(req, res, next) {
const { query } = req
console.log(query.orderBy);
let orderBy = req.query.orderBy || 'publishedAt'
let smartUrl = url + '?orderBy=' + orderBy + '&direction=ASC'
let smartUrl = url + '&orderBy=' + orderBy + '&direction=ASC'

console.log(smartUrl)
fetchJson(smartUrl).then((data) => {

fetchJson(url).then((data) => {

res.render('index', data)

})


});
});

router.get('/filtered', function(req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<li class="sortHidden">
<p>Sorteer op: </p>
<a href="/?orderBy=name&direction=ASC'" button class="sortSize">naam</button>
<a href="/?orderBy=name&direction=ASC" class="sortSize">naam</a>
</li>
<% for(let i = 0; i < smartzones.length; i++){ %>
<li class="zoneInfo">
Expand Down

0 comments on commit fa92f0c

Please sign in to comment.