15-11
This commit is contained in:
parent
ea574004ce
commit
7fe3836f73
|
|
@ -162,8 +162,10 @@ const clientDetailsSchema = new Schema({
|
|||
type: String,
|
||||
},
|
||||
accountType: {
|
||||
enum: ["CHECKING", "SAVINGS"],
|
||||
type: String,
|
||||
},
|
||||
|
||||
accountHolderName: {
|
||||
type: String,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 %>"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue