Change message.query to message.request
This commit is contained in:
parent
87f7c08f8a
commit
4434016e5c
@ -45,9 +45,9 @@ class StorageManager {
|
|||||||
|
|
||||||
if(!message.provider) return this._send(shard, { error: true, message: "Provider not provided", transactionID: message.transactionID });
|
if(!message.provider) return this._send(shard, { error: true, message: "Provider not provided", transactionID: message.transactionID });
|
||||||
if(!this.providers.has(message.provider)) return this._send(shard, { error: true, message: `Invalid provider, expected 'mongodb' or 'mariadb', got '${message.provider}'`, transactionID: message.transactionID });
|
if(!this.providers.has(message.provider)) return this._send(shard, { error: true, message: `Invalid provider, expected 'mongodb' or 'mariadb', got '${message.provider}'`, transactionID: message.transactionID });
|
||||||
if(!message.query) return this._send(shard, { error: true, message: `Missing query.`, transactionID: message.transactionID });
|
if(!message.request) return this._send(shard, { error: true, message: `Missing query.`, transactionID: message.transactionID });
|
||||||
|
|
||||||
const response = await this.providers.get(message.provider)._query(message.query);
|
const response = await this.providers.get(message.provider)._query(message.request);
|
||||||
|
|
||||||
if(response.error) {
|
if(response.error) {
|
||||||
this.manager.logger.write('error', `Provider ${message.provider} errored: ${response.message}`, shard);
|
this.manager.logger.write('error', `Provider ${message.provider} errored: ${response.message}`, shard);
|
||||||
|
Loading…
Reference in New Issue
Block a user