aboutsummaryrefslogtreecommitdiff
path: root/src/server/ApiManagers/GeneralGoogleManager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/ApiManagers/GeneralGoogleManager.ts')
-rw-r--r--src/server/ApiManagers/GeneralGoogleManager.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/server/ApiManagers/GeneralGoogleManager.ts b/src/server/ApiManagers/GeneralGoogleManager.ts
index 693b17779..7581eec13 100644
--- a/src/server/ApiManagers/GeneralGoogleManager.ts
+++ b/src/server/ApiManagers/GeneralGoogleManager.ts
@@ -99,17 +99,7 @@ export default class GeneralGoogleManager extends ApiManager {
secureHandler: async ({ user, req, res }) =>
new Promise<void>(resolve =>
GoogleApiServerUtils.processNewUser(user.id, req.query.code as string)
- .then(enriched => {
- if (enriched.refresh_token) {
- if (enriched.refresh_token) {
- user.googleToken = enriched.refresh_token;
- user.save();
- } else {
- console.warn('No refresh token returned');
- }
- }
- res.status(200).send('Google account linked successfully!');
- })
+ .then(() => res.status(200).send('Google account linked successfully!'))
.catch(err => {
console.error('Failed to process Google code:', err);
res.status(500).send('Error linking Google account');