import axios from 'axios';

import { addAuthIntercepter } from '@/utils/api/intercepters/request/authIntercepter';

const api = axios.create({
    baseURL: `/service/ervu-ui-action-service`
});

addAuthIntercepter(api);

function responseData(requestPromise) {
    return requestPromise.then(response => response.data);
}

export const uiActionService = {
    recordActivity(params) {
        return responseData(
            api.post(`/action`, params)
        );
    },
}
