-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from leclercb/develop
Merge develop into master
- Loading branch information
Showing
15 changed files
with
288 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
## New Features | ||
|
||
* Upgrade to Electron 12 | ||
* Upgrade to Google APIs 71 | ||
|
||
## Bug Fixes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 6 additions & 12 deletions
18
src/actions/publication/googlecal/GoogleCalAccountInfoActions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
import { google } from 'googleapis'; | ||
import { setPublicationData } from 'actions/PublicationActions'; | ||
import { getClient } from 'actions/publication/googlecal/GoogleCalAuthorizationActions'; | ||
import { setAuthClient } from 'actions/publication/googlecal/GoogleCalAuthorizationActions'; | ||
import { getSettings } from 'selectors/SettingSelectors'; | ||
import logger from 'utils/LogUtils'; | ||
|
||
export function getGoogleCalAccountInfo() { | ||
return async (dispatch, getState) => { | ||
const settings = getSettings(getState()); | ||
setAuthClient(settings); | ||
|
||
const client = getClient(settings); | ||
const { ipcRenderer } = window.electron; | ||
const userInfo = await ipcRenderer.invoke('google-get-user-info'); | ||
|
||
const profile = google.oauth2({ | ||
version: 'v2', | ||
auth: client | ||
}); | ||
|
||
const result = await profile.userinfo.get(); | ||
|
||
logger.debug('Get account info', result.data); | ||
logger.debug('Get account info', userInfo); | ||
|
||
await dispatch(setPublicationData('googlecal', { | ||
accountInfo: result.data | ||
accountInfo: userInfo | ||
})); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.