This commit is contained in:
=bhagwanSingh 2025-11-15 19:09:38 +05:30
parent ea574004ce
commit 7fe3836f73
3 changed files with 8 additions and 3 deletions

View File

@ -162,8 +162,10 @@ const clientDetailsSchema = new Schema({
type: String,
},
accountType: {
enum: ["CHECKING", "SAVINGS"],
type: String,
},
accountHolderName: {
type: String,
},

View File

@ -277,9 +277,9 @@
throw new Error(data.message || "Login failed");
}
if (data.token) {
if (data.success) {
// 🟢 Save token
localStorage.setItem("authToken", data.token);
localStorage.setItem("knoptpq", data.accessToken);
// 🟢 Redirect
window.location.href = "/client/dashboard";

View File

@ -90,9 +90,12 @@
<script src="/socket.io/socket.io.js"></script>
<script>
const clientId = "691311fece83c986eb8a4e89";
const token = localStorage.getItem("knoptpq");
const socket = io({
auth: {
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTQ2NTFkODM2NDZhOTAwN2EzNDI4MCIsImVtYWlsIjoiYmhhZ3dhbi5yQGhpY2dsb2JhbHNvbHV0aW9ucy5jb20iLCJuYW1lIjoiYmhhZ3dhbiIsImlhdCI6MTc2Mjk0ODk3NSwiZXhwIjoxNzYzMDM1Mzc1fQ.WvmTvfOf8DvbqKsbvfyzda1ClP8qfllKFeJINtU6mnE",
token: token,
userType: "client",
projectId: "<%= projectId %>"
},