   # Pause/unpause all alerts
   # requires an API token with admin permissions
   robot.respond /(?:grafana|graph|graf) (unpause|pause) all(?:\s+alerts)?/i, (msg) ->
-    paused = msg.match[1] == "pause"
-    postGrafana "admin/pause-all-alerts", {'paused': paused}, (result) ->
+    paused = msg.match[1] == 'pause'
+    postGrafana 'admin/pause-all-alerts', {'paused': paused}, (result) ->
       robot.logger.debug result
       if result.message
         msg.send result.message


  # Post to Grafana
  postGrafana = (url, data, callback) ->
    if grafana_api_key
      authHeader = {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Authorization': "Bearer #{grafana_api_key}"
      }
    else
      authHeader = {
        'Accept': 'application/json',
        'Content-Type': 'application/json'
      }
    jsonPayload = JSON.stringify(data)
    robot.http("#{grafana_host}/api/#{url}").headers(authHeader).post(jsonPayload) (err, res, body) ->
      if (err)
        robot.logger.error err
        return callback(false)
      data = JSON.parse(body)
      return callback(data)

  # Pick a random filename
  uploadPath = () ->


  # Call off to Grafana
  callGrafana = (url, callback) ->
    robot.http("#{grafana_host}/api/#{url}").headers(grafanaHeaders()).get() (err, res, body) ->
      if (err)
        robot.logger.error err
        return callback(false)
