{"size": 319, "ext": "js", "max_stars_repo_path": "app/javascript/cable/flag_logs.js", "max_stars_repo_name": "jsdelivrbot/metasmoke", "max_stars_repo_stars_event_min_datetime": "2015-08-15T03:25:34.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-11T04:19:39.000Z", "max_issues_repo_path": "app/javascript/cable/flag_logs.js", "max_issues_repo_name": "jsdelivrbot/metasmoke", "max_issues_repo_issues_event_min_datetime": "2016-01-30T00:43:58.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-14T08:32:53.000Z", "max_forks_repo_path": "app/javascript/cable/flag_logs.js", "max_forks_repo_name": "jsdelivrbot/metasmoke", "max_forks_repo_forks_event_min_datetime": "2015-12-09T21:10:25.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-11T04:19:28.000Z"}
{"max_stars_count": 45, "max_issues_count": 680, "max_forks_count": 60, "avg_line_length": 21.2666666667, "max_line_length": 60, "alphanum_fraction": 0.6018808777}
import { route } from '../util';
import cable from './cable';

let flagLogs;
route('/flagging/logs', () => {
  flagLogs = cable.subscriptions.create('FlagLogsChannel', {
    received(data) {
      $('table#all-flag-logs tbody').prepend(data.row);
    }
  });
}, () => {
  flagLogs.unsubscribe();
  flagLogs = null;
});
