diff --git a/backend/routes/friends.js b/backend/routes/friends.js index 9842cf2..cd6f172 100644 --- a/backend/routes/friends.js +++ b/backend/routes/friends.js @@ -32,15 +32,9 @@ router.get("/", auth, async (req, res, next) => { router.post("/", auth, async (req, res, next) => { try { const io = req.app.get("io") - let friendRes - try { - friendRes = req.body.friend.split(":") - } catch { - friendRes = req.body.friend - } const user = await User.findOne({ where: { - username: friendRes[0] || friendRes + username: req.body.friend } }) if (user) { diff --git a/frontend/package.json b/frontend/package.json index 1fd89a7..6731f4e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "colubrina-chat", - "version": "1.0.2", + "version": "1.0.3", "private": true, "author": "Troplo ", "license": "GPL-3.0", diff --git a/frontend/src/components/UserDialog.vue b/frontend/src/components/UserDialog.vue index 2740cc8..b1b093b 100644 --- a/frontend/src/components/UserDialog.vue +++ b/frontend/src/components/UserDialog.vue @@ -38,8 +38,8 @@
{{ user.item.instance }} + >{{ user.item.username }}
diff --git a/frontend/src/views/Admin/AdminThemes.vue b/frontend/src/views/Admin/AdminThemes.vue index 7cd578a..e54f922 100644 --- a/frontend/src/views/Admin/AdminThemes.vue +++ b/frontend/src/views/Admin/AdminThemes.vue @@ -48,8 +48,8 @@ export default { value: "user.id" }, { - text: "Sussi Auth ID", - value: "user.sussiId" + text: "Username", + value: "user.username" }, { text: "Created At", diff --git a/frontend/src/views/Communications/CommunicationsFriends.vue b/frontend/src/views/Communications/CommunicationsFriends.vue index 0608c32..02eb80c 100644 --- a/frontend/src/views/Communications/CommunicationsFriends.vue +++ b/frontend/src/views/Communications/CommunicationsFriends.vue @@ -306,7 +306,7 @@ export default { if (user) { this.axios .post("/api/v1/friends", { - friend: user.username + ":" + user.instance + friend: user.username }) .then(() => { this.getFriends()