abinazebinoy commited on
Commit
db3dcda
·
1 Parent(s): f0fe8e5

fix(api.js): restore missing closing brace on graphCommunities()

Browse files

graphCommunities() was never closed, which silently absorbed every
subsequent method (investigate, forensicsCircularOwnership, ...,
caseMemorySimilar) as if it were still inside it, and left an
orphaned extra closing brace at the end of the object literal.

This was a hard parse-time SyntaxError ('Function statements require
a function name' at the first nested function after the missing
brace), which meant window.Api never got defined at all -- every
Api.* call in the app (search, health, live feed, i18n, ...) threw
ReferenceError.

Verified with: node --check frontend/js/api.js

Files changed (1) hide show
  1. frontend/js/api.js +1 -1
frontend/js/api.js CHANGED
@@ -79,6 +79,7 @@ const Api = {
79
  graphCommunities: function(minSize) {
80
  var m = minSize ? "?min_size=" + minSize : "";
81
  return Api._request("/graph/communities" + m);
 
82
 
83
  // Phase 34: forensic detection
84
 
@@ -119,7 +120,6 @@ const Api = {
119
  var p = findingTypes ? "?finding_types=" + encodeURIComponent(findingTypes) : "";
120
  return Api._request("/case-memory/similar" + p);
121
  },
122
- },
123
 
124
  /**
125
  * BUG-7 FIX: was always sending text as a URL query string on a POST,
 
79
  graphCommunities: function(minSize) {
80
  var m = minSize ? "?min_size=" + minSize : "";
81
  return Api._request("/graph/communities" + m);
82
+ },
83
 
84
  // Phase 34: forensic detection
85
 
 
120
  var p = findingTypes ? "?finding_types=" + encodeURIComponent(findingTypes) : "";
121
  return Api._request("/case-memory/similar" + p);
122
  },
 
123
 
124
  /**
125
  * BUG-7 FIX: was always sending text as a URL query string on a POST,