Skip to content

Commit cabc789

Browse files
committed
made some fixes, works locally
1 parent ecfa19f commit cabc789

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

databaseb.db

48 KB
Binary file not shown.

server/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ coverage/
5757
.cache/
5858

5959
# Database Files
60-
*.db
60+
# *.db We want this db file rn

server/databaseb.db

64 KB
Binary file not shown.

web/src/components/database-entries/entry-sliver.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ export default function EntrySliver({
155155
// console.log("SEE passes: \nPass1: ", pass_1[i], "\nPass2:", pass_2[i], "\nPass3:", pass_3[i]);
156156
return;
157157
}
158-
const tests_1 = pass_1[i][typesafeKey];
159-
const tests_2 = pass_2[i][typesafeKey];
160-
const tests_3 = pass_3[i][typesafeKey];
158+
const tests_1 = pass_1[i][typesafeKey] ?? "";
159+
const tests_2 = pass_2[i][typesafeKey] ?? "";
160+
const tests_3 = pass_3[i][typesafeKey] ?? "";
161161

162162
// the 'special_notes' field is a long string and thus should probably be compared using a different method
163163
if (typesafeKey === "special_notes") {
@@ -245,9 +245,9 @@ export default function EntrySliver({
245245
// console.log("DD passes: \nPass1: ", pass_1[i], "\nPass2:", pass_2[i], "\nPass3:", pass_3[i]);
246246
return;
247247
}
248-
const tests_1 = pass_1[i][typesafeKey];
249-
const tests_2 = pass_2[i][typesafeKey];
250-
const tests_3 = pass_3[i][typesafeKey];
248+
const tests_1 = pass_1[i][typesafeKey] ?? "";
249+
const tests_2 = pass_2[i][typesafeKey] ?? "";
250+
const tests_3 = pass_3[i][typesafeKey] ?? "";
251251

252252
// the 'special_notes' field is a long string and thus should probably be compared using a different method
253253
if (typesafeKey === "special_notes") {
@@ -334,9 +334,9 @@ export default function EntrySliver({
334334
// console.log("TID passes: \nPass1: ", pass_1[i], "\nPass2:", pass_2[i], "\nPass3:", pass_3[i]);
335335
return;
336336
}
337-
const tests_1 = pass_1[i][typesafeKey];
338-
const tests_2 = pass_2[i][typesafeKey];
339-
const tests_3 = pass_3[i][typesafeKey];
337+
const tests_1 = pass_1[i][typesafeKey] ?? "";
338+
const tests_2 = pass_2[i][typesafeKey] ?? "";
339+
const tests_3 = pass_3[i][typesafeKey] ?? "";
340340

341341
// the 'special_notes' field is a long string and thus should probably be compared using a different method
342342
if (typesafeKey === "special_notes") {

web/src/components/paper-sliver.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default function PaperSliver({
150150
try {
151151
setLoading(true);
152152
const response = await fetch(
153-
`/api/adminRequest/papers/full/${paperData.id}`,
153+
`http://localhost:3000/api/adminRequest/papers/full/${paperData.id}`,
154154
{
155155
method: "GET",
156156
headers: {
@@ -323,7 +323,7 @@ export default function PaperSliver({
323323
</ModalHeader>
324324
<ModalBody>
325325
<EditEntry
326-
editedEntry={paper}
326+
editedEntry={paperData}
327327
setEditedEntry={setPaperData}
328328
showPasses={false}
329329
></EditEntry>

web/src/pages/DatabaseEntryPreviewPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function DatabaseEntryPreviewPage() {
9494
setLoading(true);
9595
try {
9696
const response = await fetch(
97-
"/api/adminRequest/papers/full",
97+
"http://localhost:3000/api/adminRequest/papers/full",
9898
{
9999
method: "POST",
100100
headers: {

web/src/pages/FrontPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export default function FrontPage() {
2424
}, [token, navigate]);
2525

2626
const loginClicked = () => {
27-
redirectToCAS();
27+
//redirectToCAS();
28+
navigate('/modify')
2829
};
2930

3031
return token ? (

web/src/pages/ModifyPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export default function ModifyPage() {
3838
const token = localStorage.getItem("jwtToken");
3939

4040
const apiReq = search
41-
? "/api/adminRequest/papers/full"
42-
: `/api/adminRequest/papers/filter?${search}`;
41+
? "http://localhost:3000/api/adminRequest/papers/full"
42+
: `http://localhost:3000/api/adminRequest/papers/filter?${search}`;
4343

4444
try {
4545
const response = await fetch(apiReq, {

web/src/pages/UploadPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default function UploadPage() {
8181
try {
8282
setLoading(true);
8383
const response = await fetch(
84-
"/api/adminRequest/parseRequest",
84+
"http://localhost:3000/api/adminRequest/parseRequest",
8585
{
8686
method: "POST",
8787
headers: {
@@ -117,7 +117,7 @@ export default function UploadPage() {
117117
<div className="flex flex-col items-center h-full bg-gray-50">
118118
<div className="w-[70%] h-full flex flex-col">
119119
<div className="bg-[#F4F4F4]">
120-
<div className="py-[6%] text-4xl">Upload New Papers</div>
120+
<div className="py-[6%] text-4xl text-black">Upload New Papers</div>
121121

122122
<div className="w-full h-8 bg-[#D4D4D4] drop-shadow-md"></div>
123123
</div>

0 commit comments

Comments
 (0)