fix lint
This commit is contained in:
@ -6,10 +6,10 @@ const index = {
|
||||
analysis: {
|
||||
analyzer: {
|
||||
ngram: {
|
||||
tokenizer: 'ngram'
|
||||
}
|
||||
}
|
||||
}
|
||||
tokenizer: 'ngram',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mappings: {
|
||||
properties: {
|
||||
@ -25,9 +25,9 @@ const index = {
|
||||
userHost: {
|
||||
type: 'keyword',
|
||||
index: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// Init ElasticSearch connection
|
||||
@ -35,9 +35,9 @@ const client = config.elasticsearch ? new elasticsearch.Client({
|
||||
node: `${config.elasticsearch.ssl ? 'https://' : 'http://'}${config.elasticsearch.host}:${config.elasticsearch.port}`,
|
||||
auth: (config.elasticsearch.user && config.elasticsearch.pass) ? {
|
||||
username: config.elasticsearch.user,
|
||||
password: config.elasticsearch.pass
|
||||
password: config.elasticsearch.pass,
|
||||
} : undefined,
|
||||
pingTimeout: 30000
|
||||
pingTimeout: 30000,
|
||||
}) : null;
|
||||
|
||||
if (client) {
|
||||
@ -47,7 +47,7 @@ if (client) {
|
||||
if (!exist.body) {
|
||||
client.indices.create({
|
||||
index: config.elasticsearch.index || 'misskey_note',
|
||||
body: index
|
||||
body: index,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -175,7 +175,7 @@ export const entities = [
|
||||
Ad,
|
||||
PasswordResetRequest,
|
||||
UserPending,
|
||||
...charts as any
|
||||
...charts as any,
|
||||
];
|
||||
|
||||
export function initDb(justBorrow = false, sync = false, forceRecreate = false) {
|
||||
@ -205,12 +205,12 @@ export function initDb(justBorrow = false, sync = false, forceRecreate = false)
|
||||
port: config.redis.port,
|
||||
password: config.redis.pass,
|
||||
prefix: `${config.redis.prefix}:query:`,
|
||||
db: config.redis.db || 0
|
||||
}
|
||||
db: config.redis.db || 0,
|
||||
},
|
||||
} : false,
|
||||
logging: log,
|
||||
logger: log ? new MyCustomLogger() : undefined,
|
||||
entities: entities
|
||||
entities: entities,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ export function createConnection() {
|
||||
{
|
||||
password: config.redis.pass,
|
||||
prefix: config.redis.prefix,
|
||||
db: config.redis.db || 0
|
||||
db: config.redis.db || 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user