core-outline 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-outline",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "A React component for Core&Outline",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -40,11 +40,11 @@ const CoreOutline = ({ children, data_source_id, data_source_secret }) => {
40
40
  }
41
41
  useEffect(async () => {
42
42
  await authorizeApp(data_source_id, data_source_secret);
43
- let sessionId = v4();
44
- setSessionId(sessionId);
45
- localStorage.setItem("coreOutlineSessionId", sessionId);
43
+ let sessId = v4();
44
+ setSessionId(sessId);
45
+ localStorage.setItem("coreOutlineSessionId", sessId);
46
46
  localStorage.setItem("coreOutlineDataSourceIdId", data_source_id);
47
- console.log("Session", sessionId);
47
+ console.log("Session", sessId);
48
48
  socket.send({
49
49
  topic: "session-data",
50
50
  data_source_id: data_source_id,
@@ -242,19 +242,19 @@ const CoreOutline = ({ children, data_source_id, data_source_secret }) => {
242
242
  }, []);
243
243
 
244
244
  function saveEvents(events) {
245
- // const requestOptions = {
246
- // method: "PUT",
247
- // headers: {
248
- // "Content-Type": "application/json",
249
- // },
250
- // body: JSON.stringify(events),
251
- // };
252
- // fetch(`http://localhost:5000/generate-s3-url/${data_source_id}/${sessionId}`)
253
- // .then((response) => response.json())
254
- // .then((data) => {
255
- // const uploadURL = data.signed_url;
256
- // return fetch(uploadURL, requestOptions);
257
- // });
245
+ const requestOptions = {
246
+ method: "PUT",
247
+ headers: {
248
+ "Content-Type": "application/json",
249
+ },
250
+ body: JSON.stringify(events),
251
+ };
252
+ fetch(`http://localhost:5000/generate-s3-url/${data_source_id}/${sessionId}`)
253
+ .then((response) => response.json())
254
+ .then((data) => {
255
+ const uploadURL = data.signed_url;
256
+ return fetch(uploadURL, requestOptions);
257
+ });
258
258
  }
259
259
 
260
260
  function saveEventsLocally(type = "formatted" || "raw") {