     window.confirmDialog "Are you sure you want to #{change} these #{changeNumber} problems?", "Mass Problem State Change",
     "Yes", "No", (() ->
       calls = _.map @props.problems, (problem) ->
-        apiCall "POST", "/api/admin/problems/availability", {pid: problem.pid, state: !enabled}
+        apiCall "PATCH", "http://localhost:5000/api/v1/problems/" + problem.pid, {disabled: !enabled}
       ($.when.apply this, calls)
         .done (() ->
-          if _.all(_.map arguments, (call) -> (_.first call).status == 1)
+          if _.all(_.map arguments, (call) -> (_.first call).success == true)
             apiNotify {status: 1, message: "All problems have been successfully changed."}
           else
             apiNotify {status: 0, message: "There was an error changing some of the problems."}


ProblemDependencyView = React.createClass
  handleClick: (bundle) ->
    apiCall "POST", "/api/admin/bundle/dependencies_active", {bid: bundle.bid, state: !bundle.dependencies_enabled}
    .done @props.onProblemChange

  render: ->


  onStateToggle: (e) ->
    e.preventDefault()
    apiCall "PATCH", "http://localhost:5000/api/v1/problems/" + @props.pid, {disabled: !@props.disabled}
    .done @props.onProblemChange

  handleExpand: (e) ->
