Introduces flow types for storage (#4349)
* Introduces flow types for storage * Better typing of QueryOptions * Adds flow types to SchemaCOntroller, - runs flow on pre tests - fixes flow * Adds ClassLevelPermissions type * Moves Controller types into a single file * Changes import styles * Changes import styles * fixing method setIndexesWithSchemaFormat (#4454) Fixing invalid database code in method `setIndexesWithSchemaFormat`: * It must be a transaction, not a task, as it executes multiple database changes * It should contain the initial queries inside the transaction, providing the context, not outside it; * Replaced the code with the ES6 Generator notation * Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters * nits * Fixes tests, improves flow typing
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/** @flow weak */
|
||||
|
||||
import * as triggers from "../triggers";
|
||||
// @flow-disable-next
|
||||
import * as Parse from "parse/node";
|
||||
// @flow-disable-next
|
||||
import * as request from "request";
|
||||
import { logger } from '../logger';
|
||||
|
||||
@@ -28,7 +30,7 @@ export class HooksController {
|
||||
}
|
||||
|
||||
getFunction(functionName) {
|
||||
return this._getHooks({ functionName: functionName }, 1).then(results => results[0]);
|
||||
return this._getHooks({ functionName: functionName }).then(results => results[0]);
|
||||
}
|
||||
|
||||
getFunctions() {
|
||||
@@ -36,7 +38,7 @@ export class HooksController {
|
||||
}
|
||||
|
||||
getTrigger(className, triggerName) {
|
||||
return this._getHooks({ className: className, triggerName: triggerName }, 1).then(results => results[0]);
|
||||
return this._getHooks({ className: className, triggerName: triggerName }).then(results => results[0]);
|
||||
}
|
||||
|
||||
getTriggers() {
|
||||
|
||||
Reference in New Issue
Block a user