import fetchWrapper from "../fetchWrapper.js";
import getXSRFToken from "../getXSRF.js";

export default async function assign(taskId) {
    const csrfToken = await getXSRFToken();

    return fetchWrapper(
        "/api/events/task/assign",
        {task_id: taskId},
        "POST",
        {"X-XSRF-TOKEN": csrfToken}
    );
}
