right now there are actions that require user authentication to be performed. The way we handle that currently is to check if the user performing the action is authenticated. If the user is authenticated, we perform the action and return a promise and if not, we return undefined.
The problem with this is that the action now have two potential return types and you need to check for the two different return types before making use of the return value.
To fix this, we need to always return a promise in the actions. That way we only need to change to return value of the action with .then, and not bother about checking if the return type is a promise or undefined.
Acceptance Criteria
- ensure that all vuex actions that perform api requests always return a promise