mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-25 20:49:12 +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) => {
|
router.post("/", auth, async (req, res, next) => {
|
||||||
try {
|
try {
|
||||||
const io = req.app.get("io")
|
const io = req.app.get("io")
|
||||||
let friendRes
|
|
||||||
try {
|
|
||||||
friendRes = req.body.friend.split(":")
|
|
||||||
} catch {
|
|
||||||
friendRes = req.body.friend
|
|
||||||
}
|
|
||||||
const user = await User.findOne({
|
const user = await User.findOne({
|
||||||
where: {
|
where: {
|
||||||
username: friendRes[0] || friendRes
|
username: req.body.friend
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (user) {
|
if (user) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "colubrina-chat",
|
"name": "colubrina-chat",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Troplo <troplo@troplo.com>",
|
"author": "Troplo <troplo@troplo.com>",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
<div class="subheading subtitle-1 text--lighten-2">
|
<div class="subheading subtitle-1 text--lighten-2">
|
||||||
<template v-if="user.item.nickname"
|
<template v-if="user.item.nickname"
|
||||||
>{{ user.item.username }}:</template
|
>{{ user.item.username }}</template
|
||||||
>{{ user.item.instance }}
|
>
|
||||||
</div>
|
</div>
|
||||||
</v-toolbar-title>
|
</v-toolbar-title>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
|
|
|
@ -48,8 +48,8 @@ export default {
|
||||||
value: "user.id"
|
value: "user.id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "Sussi Auth ID",
|
text: "Username",
|
||||||
value: "user.sussiId"
|
value: "user.username"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "Created At",
|
text: "Created At",
|
||||||
|
|
|
@ -306,7 +306,7 @@ export default {
|
||||||
if (user) {
|
if (user) {
|
||||||
this.axios
|
this.axios
|
||||||
.post("/api/v1/friends", {
|
.post("/api/v1/friends", {
|
||||||
friend: user.username + ":" + user.instance
|
friend: user.username
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getFriends()
|
this.getFriends()
|
||||||
|
|
Loading…
Reference in a new issue