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

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

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