Validated Methods

HACC Hui uses Validated Methods to allow the clients to update the Mongo collections and send Slack direct messages.

Accessing the Mongo Collections

We have 3 Validated Methods to access the Mongo Collections:

  • The defineMethod allows the client to define new documents in collections.

  • The updateMethod allows the client to update existing documents.

  • The removeItMethod allows the client to remove existing documents.

Each method has two parameters, the collection name, and the data needed to perform the operation. The methods first check the collection name to ensure it exists, then they check to see if the user has permission to perform the operation, lastly they perform the operation.

Sending Slack DMs

We have 2 Validated Methods for sending Slack direct messages:

Recording User Interactions

We have 3 Validated Methods for recording user interactions: