15-11
This commit is contained in:
parent
ea574004ce
commit
7fe3836f73
|
|
@ -162,8 +162,10 @@ const clientDetailsSchema = new Schema({
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
accountType: {
|
accountType: {
|
||||||
|
enum: ["CHECKING", "SAVINGS"],
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
accountHolderName: {
|
accountHolderName: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -277,9 +277,9 @@
|
||||||
throw new Error(data.message || "Login failed");
|
throw new Error(data.message || "Login failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.token) {
|
if (data.success) {
|
||||||
// 🟢 Save token
|
// 🟢 Save token
|
||||||
localStorage.setItem("authToken", data.token);
|
localStorage.setItem("knoptpq", data.accessToken);
|
||||||
|
|
||||||
// 🟢 Redirect
|
// 🟢 Redirect
|
||||||
window.location.href = "/client/dashboard";
|
window.location.href = "/client/dashboard";
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,12 @@
|
||||||
<script src="/socket.io/socket.io.js"></script>
|
<script src="/socket.io/socket.io.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const clientId = "691311fece83c986eb8a4e89";
|
const clientId = "691311fece83c986eb8a4e89";
|
||||||
|
|
||||||
|
const token = localStorage.getItem("knoptpq");
|
||||||
|
|
||||||
const socket = io({
|
const socket = io({
|
||||||
auth: {
|
auth: {
|
||||||
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTQ2NTFkODM2NDZhOTAwN2EzNDI4MCIsImVtYWlsIjoiYmhhZ3dhbi5yQGhpY2dsb2JhbHNvbHV0aW9ucy5jb20iLCJuYW1lIjoiYmhhZ3dhbiIsImlhdCI6MTc2Mjk0ODk3NSwiZXhwIjoxNzYzMDM1Mzc1fQ.WvmTvfOf8DvbqKsbvfyzda1ClP8qfllKFeJINtU6mnE",
|
token: token,
|
||||||
userType: "client",
|
userType: "client",
|
||||||
projectId: "<%= projectId %>"
|
projectId: "<%= projectId %>"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue