showing stripe subscribers. loading really slow.
This commit is contained in:
@@ -65,6 +65,7 @@ export default class Socket {
|
||||
payload = jwt.verify(token, process.env.JWT_SECRET);
|
||||
} catch(e) {
|
||||
console.error("error: jwt is expired ", e)
|
||||
return
|
||||
}
|
||||
ws.userEmail = payload.email;
|
||||
|
||||
@@ -87,7 +88,6 @@ export default class Socket {
|
||||
try {
|
||||
const text = msg.toString();
|
||||
const req = JSON.parse(text);
|
||||
console.log(req)
|
||||
|
||||
if(this.appOperationSchema.safeParse(req).success) {
|
||||
this.handleAppOperation(req, ws)
|
||||
@@ -127,7 +127,6 @@ export default class Socket {
|
||||
}
|
||||
|
||||
async handleFunction(req, ws) {
|
||||
console.log("func call: ", req.name, req.args)
|
||||
let responseData = await server[req.name](...req.args)
|
||||
|
||||
let response = {
|
||||
@@ -135,8 +134,6 @@ export default class Socket {
|
||||
}
|
||||
response.data = responseData
|
||||
|
||||
console.log(response)
|
||||
|
||||
if(!this.functionCallSchema.safeParse(response).success) throw new Error("Socket.handleMessage: Outgoing ws message has incorrect format!")
|
||||
ws.send(JSON.stringify(response))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user