adding user record

This commit is contained in:
counter 2023-01-15 18:03:44 -08:00
parent 9a39a2b4dc
commit 8997f7a4c4

3
app.js
View file

@ -300,7 +300,8 @@ async function get_app_server() {
client.setCredentials(tokens);
const oauth2 = google.oauth2({version: 'v2', auth: client});
const googleUserProfile = await oauth2.userinfo.v2.me.get();
email = googleUserProfile.data.email
console.log(JSON.stringify(googleUserProfile))
const email = googleUserProfile.data.email
const [user, created] = await Users.findOrCreate({ where: { 'email': email } });
if(created){
user.path = makeRandomPath(20);