mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-22 11:17:56 +11:00
1.0.3
This commit is contained in:
parent
9f3ff615bf
commit
d8432f574b
5 changed files with 7 additions and 13 deletions
|
@ -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) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "colubrina-chat",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"private": true,
|
||||
"author": "Troplo <troplo@troplo.com>",
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
</v-tooltip>
|
||||
<div class="subheading subtitle-1 text--lighten-2">
|
||||
<template v-if="user.item.nickname"
|
||||
>{{ user.item.username }}:</template
|
||||
>{{ user.item.instance }}
|
||||
>{{ user.item.username }}</template
|
||||
>
|
||||
</div>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
|
|
@ -48,8 +48,8 @@ export default {
|
|||
value: "user.id"
|
||||
},
|
||||
{
|
||||
text: "Sussi Auth ID",
|
||||
value: "user.sussiId"
|
||||
text: "Username",
|
||||
value: "user.username"
|
||||
},
|
||||
{
|
||||
text: "Created At",
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue