From f84995ed8fc7ba830fa3170e4b159d7ada24af56 Mon Sep 17 00:00:00 2001 From: RochesterX Date: Wed, 26 Nov 2025 23:25:02 -0500 Subject: [PATCH] Format --- public/assets/css/style.css | 14 +++++++++----- server.js | 7 ++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 12b81d6..a4b5e9b 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -79,13 +79,19 @@ body { display: flex; flex-direction: column; align-items: center; + gap: 10px; + margin-top: 30px; } form { display: flex; flex-direction: column; align-items: center; - max-width: 250px; + border: 2px solid #AAAAAA; + border-radius: 10px; + padding: 10px; + margin: 20px; + gap: 5px; } .loginForm input { @@ -112,8 +118,6 @@ a { button { background-color: transparent; border: 2px solid #606060; - margin: 10px; - width: 75px; border-radius: 5px; padding: 5px; gap: 5px; @@ -134,7 +138,6 @@ input { border-radius: 5px; padding: 2px; padding-left: 5px; - width: 95%; gap: 5px; color: white; text-decoration: none; @@ -220,7 +223,6 @@ a:focus { .inputGroup { display: flex; flex-direction: row; - min-width: 500px; gap: 16px; } @@ -272,6 +274,8 @@ p { color: #eeeeee; font: 16px tahoma, sans-serif; min-width: 50px; + margin-top: 5px; + margin-bottom: 5px; } :focus { diff --git a/server.js b/server.js index 16bf5ce..683eda7 100644 --- a/server.js +++ b/server.js @@ -225,7 +225,7 @@ app.post("/setInfo", authenticate, async (req, res) => { .input("username", sql.VarChar, req.user.Username) .input("firstName", sql.NVarChar(50), firstName) .input("lastName", sql.NVarChar(50), lastName) - .input("dob", sql.Date, dob) + .input("dob", sql.Date, dob || null) .query(` UPDATE Users SET FirstName = @firstName, @@ -235,7 +235,12 @@ app.post("/setInfo", authenticate, async (req, res) => { `); } catch (error) { console.log(error); + if (error.message.includes("failed for parameter 'dob'.")) { + res.status(500).json({ message: "Must input date of birth" }) + return; + } res.status(500).json({ message: "Update request failed" }) + return; } var updatedUser = req.user;