Skip to content

Commit a0a2b61

Browse files
committed
updated
1 parent 6d71f06 commit a0a2b61

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

server/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ router.get("/getGithubUserData", async function (req, res) {
268268
});
269269

270270

271-
// milestone status endpoint and related functions -- VERY IMPORTANT COMPILATION MULTIPLE TABLES AND SEND DATA TO FRONTEND
271+
// milestone status endpoint and related functions -- VERY IMPORTANT COMPILATION OF MULTIPLE TABLES, FILTER AND SEND DATA TO FRONTEND
272272
router.get("/milestonestatus/:githubusername", async (req, res) => {
273273
try {
274274
const gitUser = req.params.githubusername;

tables.sql

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
-- CreateTable
22
CREATE TABLE trainee (
33
"id" SERIAL PRIMARY KEY,
4-
"githubUserName" VARCHAR (50) NOT NULL,
5-
"codewarsUserName" VARCHAR (50),
6-
"displayName" VARCHAR (50),
4+
"githubusername" VARCHAR (50) NOT NULL,
5+
"codewarsuserName" VARCHAR (50),
6+
"displayname" VARCHAR (50),
77
"cohort" VARCHAR (50)
88
);
99

1010
-- CreateTable
1111
CREATE TABLE extractedData (
1212
"id" SERIAL PRIMARY KEY,
13-
"traineeID" INTEGER NOT NULl,
14-
"date" DATE,
13+
"traineeid" INTEGER NOT NULl,
14+
"timestamp" timestamp,
1515
"codewarsrank" INTEGER NOT NULL,
1616
"codewarsjspoints" INTEGER NOT NULL,
17-
"githubPrs" INTEGER NOT NULL,
17+
"githubprs" INTEGER NOT NULL,
1818
FOREIGN KEY (traineeID) REFERENCES trainee(id)
1919
);
2020

@@ -27,11 +27,11 @@ CREATE TABLE cohorts (
2727
-- CreateTable
2828
CREATE TABLE milestone (
2929
"id" SERIAL PRIMARY KEY,
30-
"moduleName" VARCHAR (50) NOT NULL,
30+
"modulename" VARCHAR (50) NOT NULL,
3131
"date" DATE,
32-
"codewarsRank" INTEGER NOT NULL,
33-
"githubPrs" INTEGER NOT NULL,
34-
"codewarsJsPoints" INTEGER NOT NULL
32+
"codewarsrank" INTEGER NOT NULL,
33+
"githubprs" INTEGER NOT NULL,
34+
"codewarsjspoints" INTEGER NOT NULL
3535
);
3636

3737
CREATE TABLE cyfrepos(

0 commit comments

Comments
 (0)