fix: postgres indexing (#791) + deactivate handler

This commit is contained in:
Nick
2019-03-24 00:27:42 -04:00
parent 2a950575e2
commit 7c77cb0815
12 changed files with 167 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
const _ = require('lodash')
/* global WIKI */
module.exports = {
activate() {
@@ -32,7 +32,7 @@ module.exports = {
}
// TODO: Add user permissions filtering
builder.andWhere(builder => {
switch(WIKI.config.db.type) {
switch (WIKI.config.db.type) {
case 'postgres':
builder.where('title', 'ILIKE', `%${q}%`)
builder.orWhere('description', 'ILIKE', `%${q}%`)