frontend/src/common/api.js
/** Tells the API to reset the import queue */
Tells the API to reset the import queue
Tells the API to reset the import queue
function useMutateResetImportQueue(courseId) {
  const client = useQueryClient();
  return useMutation(
    () =>
      apiClient(`courses/${courseId}/import-queue/`, {
        method: "DELETE",
      }),
    {
      onSuccess() {
        client.invalidateQueries(["course", courseId, "import"]);
      },
    }
  );
}
function useMutateResetImportQueue ( courseId ) { const client = useQueryClient ( ) ; return useMutation ( ( ) => apiClient ( ` ${ courseId } ` , { method : "DELETE" , } ) , { onSuccess ( ) { client . invalidateQueries ( [ "course" , courseId , "import" ] ) ; } , } ) ; }
Tells the API to reset the import queue
Tells the API to reset the import queue