Class: AccessLevelAPI

AccessLevelAPI()

This class contains all the datasources method for AccessLevel API

Constructor

new AccessLevelAPI()

Source:

Methods

(async) addAccessLevel(passedAccessLevel) → {Object}

This method adds the given access level object and syncs it with both the user and club document. It pushes the id to clubAcess of User document and memberAcess of Club document

Parameters:
Name Type Description
passedAccessLevel Object

input access level object

Source:
Returns:

created access level object

Type
Object

(async) deleteAccessLevel(id) → {Object}

Parameters:
Name Type Description
id Object

id of the access level object to be deleted

Source:
Returns:

deleted access level object

Type
Object

(async) deleteAccessLevelFromUser(id) → {Object}

This is called when deleting a club or any particular instance where the accesslevels from the clubs need not be deleted, as the entire club is going to be deleted

Parameters:
Name Type Description
id Object

id of the access level object to be deleted

Source:
Returns:

deleted access level object

Type
Object

resolveAccess(accessArray) → {Array}

Returns an array of resolved Access Levels

Parameters:
Name Type Description
accessArray Array

array of ids to be resolved

Source:
Returns:

array of resolved access level objects

Type
Array

(async) updateAccessLevel(passedAccessLevel) → {Object}

Parameters:
Name Type Description
passedAccessLevel Object

input access level object

Source:
Returns:

updated access level object

Type
Object