Skip to content
Snippets Groups Projects
Commit 2820713c authored by Mahdi Yari's avatar Mahdi Yari
Browse files

Update comment.js

parent 8da31014
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ export const commentHandler = async (params, limit, start, reverse, startParam)
queryString += ' AND '
queryParams.push(params[paramKeys[i]])
}
const query = `SELECT x.* FROM hafsql.comments x WHERE ${queryString} id ${reverse && startParam ? '>=' : '<='} ${start}
const query = `SELECT x.* FROM hafsql.comments x WHERE ${queryString} id ${reverse && startParam ? '>=' : '<='} ${start} AND deleted=false
ORDER BY id ${reverse ? 'ASC' : 'DESC'} LIMIT ${limit}`
return pool.query(query, queryParams)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment