import { getUrl } from "../helper";
import { authedFunction } from "../session";

export const analyticsActions = {
	log: (site, actionType, entityType, entityId, data) => {
		return authedFunction({
			method: "POST",
			url: getUrl("analytics", "log"),
			data: {
				site,
				actionType,
				entityType,
				entityId,
				data,
			},
		}).catch((error) => {
			console.log("log error", error);
		});
	},
};
