mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-23 19:46:28 -05:00
fixed infinite vouch bug
This commit is contained in:
@@ -9,6 +9,7 @@ import { addSuggestion } from "../../graphql/mutations/addSuggestion"
|
||||
import { suggestions } from "../../graphql/queries/suggestions"
|
||||
import { vouches } from "../../graphql/queries/vouches"
|
||||
import { addVouch } from "../../graphql/mutations/addVouch"
|
||||
import { userLean } from "../../graphql/queries/userLean"
|
||||
|
||||
const SuggestionForm = ({
|
||||
plusServer,
|
||||
@@ -42,6 +43,9 @@ const SuggestionForm = ({
|
||||
{
|
||||
query: vouches,
|
||||
},
|
||||
{
|
||||
query: userLean,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@@ -58,8 +62,6 @@ const SuggestionForm = ({
|
||||
}
|
||||
}
|
||||
|
||||
console.log("CanVouchFor", canVouchFor)
|
||||
|
||||
return (
|
||||
<>
|
||||
{selectedUser ? (
|
||||
|
||||
@@ -433,7 +433,8 @@ const resolvers = {
|
||||
const vouchingUser = await User.findOne({
|
||||
discord_id: ctx.user.discord_id,
|
||||
})
|
||||
vouchingUser.can_vouch = null
|
||||
|
||||
vouchingUser.plus.can_vouch = undefined
|
||||
|
||||
await user.save()
|
||||
await vouchingUser.save()
|
||||
|
||||
Reference in New Issue
Block a user