aboutsummaryrefslogtreecommitdiff
path: root/src/server/ApiManagers/GeneralGoogleManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-04 22:07:36 -0400
committerbobzel <zzzman@gmail.com>2025-06-04 22:07:36 -0400
commit59689fe94c27986674dd6ecb7f0e6073861a98a6 (patch)
tree42ef1d5a631676e0b0c63076f60a48064fac642d /src/server/ApiManagers/GeneralGoogleManager.ts
parentf7cb0dcebb0514cf38f8a7e635ec9959c196145a (diff)
more cleanup of google authorization
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');