Fix bug with uppercase in search query
This commit is contained in:
parent
122852a14c
commit
3c78a6ac6c
|
@ -4,6 +4,11 @@ const post = require('./models/post')
|
|||
const searchView = require('./views/search')
|
||||
|
||||
module.exports = async function searchPage ({ query }) {
|
||||
if (typeof query === 'string') {
|
||||
// https://github.com/ssbc/ssb-search/issues/7
|
||||
query = query.toLowerCase()
|
||||
}
|
||||
|
||||
const messages = await post.search({ query })
|
||||
|
||||
return searchView({ messages, query })
|
||||
|
|
Loading…
Reference in New Issue