Skip to content

Commit

Permalink
analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Aug 20, 2024
1 parent 22827a3 commit be3c2aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions next_app/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ app.post('/analytics', (req, res) => {
const body = req.body as TBody;
const ipAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress;

console.log(ipAddress, body)
console.log(timestamp, ipAddress, body)

switch (body.action) {
case "codecell_load":
db.run(codecell_load_table);
break;
case "codecell_run":
db.run(codecell_run_table);
break;
default:
break;
Expand Down
1 change: 1 addition & 0 deletions next_app/src/pages/codecell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function CodeCell() {
},
body: JSON.stringify(body)
});
console.log(userId);
}

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion next_app/src/pages/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Dev() {
cellId="1" // any unique cell id
appName="BetterIDEa" // Your unique app name
code="print('Portable code cell ftw!')" // initial code (optional)
devMode
// devMode
nowallet
onNewMessage={(message) => {
message.forEach((m) => {
Expand Down

0 comments on commit be3c2aa

Please sign in to comment.