diff options
Diffstat (limited to 'src/server/ApiManagers/GeneralGoogleManager.ts')
-rw-r--r-- | src/server/ApiManagers/GeneralGoogleManager.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/ApiManagers/GeneralGoogleManager.ts b/src/server/ApiManagers/GeneralGoogleManager.ts index 7581eec13..81efc3eb5 100644 --- a/src/server/ApiManagers/GeneralGoogleManager.ts +++ b/src/server/ApiManagers/GeneralGoogleManager.ts @@ -17,7 +17,7 @@ export default class GeneralGoogleManager extends ApiManager { method: Method.GET, subscription: '/readGoogleAccessToken', secureHandler: async ({ user, res }) => { - const { credentials } = await GoogleApiServerUtils.retrieveCredentials(user); + const { credentials } = await GoogleApiServerUtils.retrieveCredentials(user.id as string); if (!credentials?.access_token) { const url = GoogleApiServerUtils.generateAuthenticationUrl(); return res.send(url); @@ -49,7 +49,7 @@ export default class GeneralGoogleManager extends ApiManager { secureHandler: async ({ req, res, user }) => { const sector: GoogleApiServerUtils.Service = req.params.sector as GoogleApiServerUtils.Service; const action: GoogleApiServerUtils.Action = req.params.action as GoogleApiServerUtils.Action; - const endpoint = await GoogleApiServerUtils.GetEndpoint(GoogleApiServerUtils.Service[sector], user); + const endpoint = await GoogleApiServerUtils.GetEndpoint(GoogleApiServerUtils.Service[sector], user.id); const handler = EndpointHandlerMap.get(action); if (endpoint && handler) { try { @@ -71,7 +71,7 @@ export default class GeneralGoogleManager extends ApiManager { subscription: new RouteSubscriber('googleTasks').add('create'), secureHandler: async ({ req, res, user }) => { try { - const auth = await GoogleApiServerUtils.retrieveOAuthClient(user); + const auth = await GoogleApiServerUtils.retrieveOAuthClient(user.id); if (!auth) { return res.status(401).send('Google credentials missing or invalid.'); |