From 3388ede0690540d45a0751233a40a947f0f37873 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Fri, 31 Mar 2023 21:41:41 +0200 Subject: [PATCH] remove duplicate error --- src/api/acts/rooms.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/api/acts/rooms.ts b/src/api/acts/rooms.ts index 2cb03bb..91a2186 100644 --- a/src/api/acts/rooms.ts +++ b/src/api/acts/rooms.ts @@ -275,13 +275,15 @@ export const joinRoom: Act = { client.state == STATE.remote ? client.server.tag : "local", 0 ).query(db); - if (queryx.affectedRows > 0) { + aws("ok", ""); + /*if (queryx.affectedRows > 0) { aws("ok", ""); } else { aws("error", act_error.DUPLICATE); - } + }*/ } catch (error) { - aws("error", act_error.DUPLICATE); + aws("ok", ""); + //aws("error", act_error.DUPLICATE); } } @@ -332,13 +334,15 @@ export const joinPublicRoom: Act = { client.state == STATE.remote ? client.server.tag : "local", 0 ).query(db); - if (queryx.affectedRows > 0) { + aws("ok", ""); + /*if (queryx.affectedRows > 0) { aws("ok", ""); } else { aws("error", act_error.DUPLICATE); - } + }*/ } catch (error) { - aws("error", act_error.DUPLICATE); + aws("ok", ""); + //aws("error", act_error.DUPLICATE); } } };