I have the following endpoint in a class called `UserApi.js`:

```
const controller = 'User';
...
export async function getEmployeeInfo(employeeId) 
{
  const query = createQueryFromObject({employeId});
  const response = await get(`/${controller}/EmployeeInfo?${query}`);
  return retrieveResponseData(response, []);
}

```

This is going to get the required information from an action method in the backend of `UserController.cs`.

Now, say that I want to display this information in `EmployeeView.vue` class, do I have to await it again? Why or why not? Initially, I would say no, you don't, as you already dealt with the `await/async` in the `UserApi.js` class, but what about the `Promise.resolve`? Please explain.

```
  methods: {
    async setReportData(
     employeeId
    ) {
      this.isBusy = true;
      Promise.resolve(getEmployeeInfo(
        employeeId
      )).then((resultsEmployeeInfo) => {
        this.reportDatatableEmployeeInfo = resultsEmployeeInfo;
      })
        .catch(() => {
          this.alerts.error('An error has occurred while fetching the data');
        })
        .finally(() => {
          this.isBusy = false;
        });
    },

```

Update:
....

```
 * @param {Object} response
 * @param {any} defaultData
 * @param {Function} predicate
 * @returns {Promise}
 */
export function retrieveResponseData(response, defaultData = null, predicate = (predicateResponse) => predicateResponse) {
  const data = predicate(response) ? response.data : null;

  return data || defaultData;
}

```