Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
lelemm and coderabbitai[bot] authored Nov 11, 2024
1 parent f730a73 commit 20d8e40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/accounts/openid.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export async function loginWithOpenIdFinalize(body) {
return { url: `${return_url}/openid-cb?token=${token}` };
} catch (err) {
console.error('OpenID grant failed:', err);
return { error: 'openid-grant-failed: ' + err };
console.error('OpenID grant failed:', err);
return { error: 'openid-grant-failed' };
}
}
6 changes: 5 additions & 1 deletion src/app-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ app.post('/upload-user-file', async (req, res) => {
syncVersion: syncFormatVersion,
name: name,
encryptMeta: encryptMeta,
owner: res.locals.user_id,
encryptMeta: encryptMeta,

Check failure on line 249 in src/app-sync.js

View workflow job for this annotation

GitHub Actions / build

An object literal cannot have multiple properties with the same name.

Check failure on line 249 in src/app-sync.js

View workflow job for this annotation

GitHub Actions / lint

Duplicate key 'encryptMeta'
// Ensure user_id exists before setting owner
owner: res.locals.user_id || (() => {

Check failure on line 251 in src/app-sync.js

View workflow job for this annotation

GitHub Actions / lint

Replace `·res.locals.user_id·||` with `⏎··········res.locals.user_id·||⏎·········`
throw new Error('User ID is required for file creation');

Check failure on line 252 in src/app-sync.js

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
})(),

Check failure on line 253 in src/app-sync.js

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
}),
);

Expand Down

0 comments on commit 20d8e40

Please sign in to comment.