Fix the frontend API calls and implement logins on frontend #7

Merged
dylan merged 24 commits from feat/update-frontend-api-calls into main 2026-03-04 20:20:50 +00:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit 4e99b77492 - Show all commits

View File

@@ -127,8 +127,8 @@ class InteractionAnalysis:
def interaction_graph(self, df: pd.DataFrame):
interactions = {a: {} for a in df["author"].dropna().unique()}
# reply_to refers to the comment id, this allows us to map comment ids to usernames
id_to_author = df.set_index("id")["author"].to_dict()
# reply_to refers to the comment id, this allows us to map comment/post ids to usernames
id_to_author = df.set_index("post_id")["author"].to_dict()
for _, row in df.iterrows():
a = row["author"]

View File

@@ -52,6 +52,7 @@ class DatasetManager:
query = """
INSERT INTO events (
dataset_id,
post_id,
type,
parent_id,
author,
@@ -78,13 +79,14 @@ class DatasetManager:
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s
%s, %s
)
"""
values = [
(
dataset_id,
row["id"],
row["type"],
row["parent_id"],
row["author"],

View File

@@ -30,6 +30,8 @@ CREATE TABLE events (
/* Required Fields */
id SERIAL PRIMARY KEY,
dataset_id INTEGER NOT NULL,
post_id VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
author VARCHAR(255) NOT NULL,