mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-24 23:19:39 -05:00
grab youtube id when logged in
This commit is contained in:
parent
47c0d79c6e
commit
7406dc18ae
|
|
@ -43,6 +43,7 @@ const typeDef = gql`
|
|||
twitch_name: String
|
||||
twitter_name: String
|
||||
youtube_name: String
|
||||
youtube_id: String
|
||||
country: String
|
||||
sens: Sens
|
||||
bio: String
|
||||
|
|
|
|||
4
index.js
4
index.js
|
|
@ -45,11 +45,13 @@ passport.use(
|
|||
} else if (connection.type === "twitter") {
|
||||
userToSave.twitter_name = connection.name.toLowerCase()
|
||||
} else if (connection.type === "youtube") {
|
||||
userToSave.youtube_name = connection.name.toLowerCase()
|
||||
userToSave.youtube_name = connection.name
|
||||
userToSave.youtube_id = connection.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log("userToSave", userToSave)
|
||||
User.updateOne(
|
||||
{ discord_id: userToSave.discord_id },
|
||||
userToSave,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ const userSchema = new mongoose.Schema({
|
|||
twitch_name: String,
|
||||
twitter_name: String,
|
||||
youtube_name: String,
|
||||
youtube_id: String,
|
||||
country: String,
|
||||
sens: {
|
||||
stick: { type: Number, min: -5, max: 5 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user