Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug issue#147 #149

Merged
merged 2 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/core/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const EventEmitter = require('events');

const Sync = require('./sync');
const globals = require('../../config/globals');
const OAuth2 = google.auth.OAuth2;
const OAuth2 = google.google.auth.OAuth2;

const toSave = ["email", "about", "tokens", "folder", "saveTime", "permanentlyDeleteSetting"];

Expand Down Expand Up @@ -64,9 +64,9 @@ class Account extends EventEmitter {
if (err) {
return reject(err);
}

this.about = about;
this.email = about.user.emailAddress;
this.email = about.data.emailAddress;

this.save().then(resolve, reject);
});
Expand Down Expand Up @@ -128,9 +128,10 @@ class Account extends EventEmitter {

onTokensReceived(tokens) {
this.tokens = tokens;
console.log(tokens);

this.oauth.setCredentials(tokens);
this.drive = google.drive({
this.drive = google.google.drive({
version: 'v3',
auth: this.oauth
});
Expand Down
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,41 @@
"array-unique": "^0.3.2",
"auto-launch": "^5.0.5",
"body-parser": "^1.19.0",
"bootstrap": "4.3.1",
"chokidar": "^3.0.0",
"bootstrap": "4.4.1",
"chokidar": "^3.3.1",
"command-line-args": "^5.1.1",
"deep-equal": "^1.0.1",
"delay": "^4.2.0",
"ejs": "^2.6.2",
"deep-equal": "^2.0.1",
"delay": "^4.3.0",
"ejs": "^3.0.1",
"express": "^4.17.1",
"file-loader": "^4.0.0",
"file-loader": "^5.0.2",
"font-awesome": "^4.7.0",
"fs-extra": "^8.0.1",
"googleapis": "^22.2.0",
"jquery": "^3.4.0",
"fs-extra": "^8.1.0",
"googleapis": "^46.0.0",
"jquery": "^3.4.1",
"md5-file": "^4.0.0",
"mkdirp-promise": "^5.0.1",
"morgan": "^1.9.1",
"nedb-promise": "^2.0.1",
"node-notifier": "^5.4.0",
"node-sass": "^4.12.0",
"popper.js": "^1.15.0",
"sass-loader": "^7.1.0",
"tether": "^1.4.6"
"node-notifier": "^6.0.0",
"node-sass": "^4.13.0",
"popper.js": "^1.16.0",
"sass-loader": "^8.0.0",
"tether": "^1.4.7"
},
"devDependencies": {
"copy-webpack-plugin": "^5.0.3",
"css-loader": "^3.1.0",
"electron": "^4.2.8",
"electron-builder": "^20.40.2",
"electron-packager": "^13.1.1",
"eslint": "^6.1.0",
"mini-css-extract-plugin": "^0.8.0",
"resolve-url-loader": "^3.1.0",
"style-loader": "^0.23.1",
"url-loader": "^2.0.0",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1"
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.1",
"electron": "^7.1.7",
"electron-builder": "^21.2.0",
"electron-packager": "^14.1.1",
"eslint": "^6.8.0",
"mini-css-extract-plugin": "^0.9.0",
"resolve-url-loader": "^3.1.1",
"style-loader": "^1.1.2",
"url-loader": "^3.0.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"scripts": {
"lint": "eslint app main.js",
Expand Down