Skip to content
Permalink
Browse files
Resolve linting issues
  • Loading branch information
jeea2 committed Dec 2, 2019
1 parent 14c00e2 commit f5c62650c97b4fb52a4a041e21a6ec9885130d40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
@@ -37,14 +37,14 @@ const dbName = 'database.db'
router.get('/', async ctx => {
try {
const article = await new Article(dbName)
const data = await article.getReleased()
let data = await article.getReleased()
if(ctx.session.authorised === true) {
const user = await new User(dbName)
const userData = await user.getUser(ctx.session.user)
await ctx.render('homepage', {articles: data, user: userData})
} else await ctx.render('homepage', {articles: data})
await ctx.render('homepage', {articles: data})
const data = await article.search(ctx.query)
data = await article.search(ctx.query)
const numOfResults = data.length
await ctx.render('homepage', {articles: data, query: ctx.query.q, num: numOfResults})
} catch(err) {
@@ -85,4 +85,4 @@ describe('link()', () => {
expect(linked).toEqual(true)
done()
})
})
})

0 comments on commit f5c6265

Please sign in to comment.