From 4cacf555c258df5a3600296c29a6b3c30a18b15a Mon Sep 17 00:00:00 2001 From: Harsh Khandeparkar Date: Sat, 21 Sep 2024 11:07:52 +0530 Subject: [PATCH] feat: send `approve_status` and `upload_timestamp` with unapproved paper data --- backend/handlers.go | 2 +- frontend/.env.development | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handlers.go b/backend/handlers.go index 3d8227f9..54de0553 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -146,7 +146,7 @@ func ListAllPapers(w http.ResponseWriter, r *http.Request) { func ListUnapprovedPapers(w http.ResponseWriter, r *http.Request) { db := db.GetDB() - rows, err := db.Db.Query(context.Background(), "SELECT course_code, course_name, year, exam, filelink, id, from_library FROM iqps WHERE approve_status = false ORDER BY upload_timestamp ASC") + rows, err := db.Db.Query(context.Background(), "SELECT course_code, course_name, year, exam, filelink, id, from_library, approve_status, upload_timestamp FROM iqps WHERE approve_status = false ORDER BY upload_timestamp ASC") if err != nil { sendErrorResponse(w, http.StatusInternalServerError, err.Error(), nil) return diff --git a/frontend/.env.development b/frontend/.env.development index 10f5ac1c..251bd285 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,3 +1,3 @@ -VITE_BACKEND_URL=http://localhost:5000 +VITE_BACKEND_URL=https://iqps-server.metakgp.org VITE_MAX_UPLOAD_LIMIT=10 VITE_GH_OAUTH_CLIENT_ID=Ov23lifQ41R6QGgUN4rM \ No newline at end of file