Skip to content

Commit c2f65ea

Browse files
Merge pull request #35 from ReEnvision-webdev/refractor
2 parents 3b635c9 + 10a88a4 commit c2f65ea

46 files changed

Lines changed: 18465 additions & 7242 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idx/dev.nix

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
pkgs.gh
66
];
77
idx.extensions = [
8-
9-
10-
"ahmadawais.shades-of-purple"
11-
"Google.validation-agent-extension"
12-
"Letgamer.sweet-vscode-icons"];
8+
"ahmadawais.shades-of-purple"
9+
"Google.validation-agent-extension"
10+
"Letgamer.sweet-vscode-icons"
11+
];
1312
idx.previews = {
13+
enable = true; # Required to activate the previews block
1414
previews = {
1515
web = {
1616
command = [
@@ -25,4 +25,14 @@
2525
};
2626
};
2727
};
28-
}
28+
29+
30+
# Standard environment variables go here.
31+
# If you don't specifically need 'currentNodeJsVersion' for your app code, remove it.
32+
env = {
33+
# Add this specific field if the Studio backend is looking for it
34+
currentNodeJsVersion = "20";
35+
NODE_VERSION = "20";
36+
};
37+
38+
}

TODO

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
add a signout button too
2-
fix carrousel bug thing
1+
4. delete db courses table and add new table for geolocations of chapters

drizzle.config.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ let connectionString: string;
77
if (process.env.DATABASE_URL) {
88
// If DATABASE_URL is provided, use it directly
99
connectionString = process.env.DATABASE_URL;
10-
} else if (process.env.DATABASE_USER && process.env.DATABASE_PASSWORD &&
11-
process.env.DATABASE_HOST && process.env.DATABASE_PORT &&
12-
process.env.DATABASE_NAME) {
10+
} else if (
11+
process.env.DATABASE_USER &&
12+
process.env.DATABASE_PASSWORD &&
13+
process.env.DATABASE_HOST &&
14+
process.env.DATABASE_PORT &&
15+
process.env.DATABASE_NAME
16+
) {
1317
// Build connection string from individual variables
1418
connectionString = `postgresql://${process.env.DATABASE_USER}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}:${process.env.DATABASE_PORT}/${process.env.DATABASE_NAME}?sslmode=no-verify`;
1519
} else {
16-
throw new Error("Database connection variables are not properly set. Please ensure either DATABASE_URL or all of DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, DATABASE_NAME are defined in your environment.");
20+
throw new Error(
21+
"Database connection variables are not properly set. Please ensure either DATABASE_URL or all of DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, DATABASE_NAME are defined in your environment.",
22+
);
1723
}
1824

1925
export default defineConfig({

drizzle/0002_known_landau.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CREATE TABLE "chapters" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"chapter_name" text NOT NULL,
4+
"chapter_location" text NOT NULL,
5+
"description" text NOT NULL,
6+
"chapter website" text
7+
);
8+
--> statement-breakpoint
9+
ALTER TABLE "users" ADD COLUMN "is_verified" boolean DEFAULT false NOT NULL;

drizzle/meta/0000_snapshot.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,8 @@
6565
"name": "events_created_by_users_id_fk",
6666
"tableFrom": "events",
6767
"tableTo": "users",
68-
"columnsFrom": [
69-
"created_by"
70-
],
71-
"columnsTo": [
72-
"id"
73-
],
68+
"columnsFrom": ["created_by"],
69+
"columnsTo": ["id"],
7470
"onDelete": "no action",
7571
"onUpdate": "no action"
7672
}
@@ -182,9 +178,7 @@
182178
"users_email_unique": {
183179
"name": "users_email_unique",
184180
"nullsNotDistinct": false,
185-
"columns": [
186-
"email"
187-
]
181+
"columns": ["email"]
188182
}
189183
},
190184
"policies": {},
@@ -203,4 +197,4 @@
203197
"schemas": {},
204198
"tables": {}
205199
}
206-
}
200+
}

drizzle/meta/0001_snapshot.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,8 @@
6565
"name": "events_created_by_users_id_fk",
6666
"tableFrom": "events",
6767
"tableTo": "users",
68-
"columnsFrom": [
69-
"created_by"
70-
],
71-
"columnsTo": [
72-
"id"
73-
],
68+
"columnsFrom": ["created_by"],
69+
"columnsTo": ["id"],
7470
"onDelete": "no action",
7571
"onUpdate": "no action"
7672
}
@@ -200,9 +196,7 @@
200196
"users_email_unique": {
201197
"name": "users_email_unique",
202198
"nullsNotDistinct": false,
203-
"columns": [
204-
"email"
205-
]
199+
"columns": ["email"]
206200
}
207201
},
208202
"policies": {},
@@ -221,4 +215,4 @@
221215
"schemas": {},
222216
"tables": {}
223217
}
224-
}
218+
}

0 commit comments

Comments
 (0)