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

export default async function assign(taskId: number): Promise<any> {
    const csrfToken = await getXSRFToken();

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