-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 🐛 Zenodo callback issue resolved with purging token before sign in #116
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
0767e2c
refactor: :recycle: transfer validation api to codefair repo (#106)
slugb0t be75575
🚚 chore: rename `validator-api` to `validator`
megasanjay 8e3b3a4
👷 ci: add validator deploy
megasanjay aba85b3
👷 ci: add validator healthcheck
megasanjay 242bde1
👷 ci: add validator deploy for prod
megasanjay 303824b
refactor: :recycle: update codefair name
slugb0t 96d4e82
feat: ✨ Metadata + license validators + bug patches (#107)
slugb0t 9219131
fix: :bug: use the correct env variable for private key
slugb0t 76c35b7
fix: 🐛 Codefair v3.2.0 finalization (#113)
slugb0t 95dad9c
fix: :bug: migrate db during deployment
slugb0t f570d2d
fix: :bug: revert
slugb0t 4db16dd
fix: :bug: typo on dockerfile
slugb0t 10de0d5
refactor: :recycle: use npm instead of yarn for migration
slugb0t 408a242
refactor: :recycle: access db url during prisma build
slugb0t b3b75f6
refactor: :recycle: apply node env
slugb0t e97beb0
💚 ci: copy package json
megasanjay 2c5b413
💚 ci: revert arg
megasanjay a3f891d
💚 ci: add prisma migrate to ci
megasanjay c0b0540
💚 ci: add prisma migrate to ci
megasanjay fd0b979
👷 ci: update dockerfile
megasanjay 561169d
refactor: :recycle: use deployed validator
slugb0t 027c86d
Merge branch 'staging' of https://github.com/fairdataihub/codefair-ap…
slugb0t 29c0617
fix: :bug: when license is updated validate metadata files
slugb0t a86c6ca
fix: :bug: validation returns codemeta version on errors
slugb0t dd9718e
🐛 fix: add basic logwatch
megasanjay 1f51519
fix: :bug: add @type key for 2.0 codemeta.json files
slugb0t 25bc54b
Merge branch 'staging' of https://github.com/fairdataihub/codefair-ap…
slugb0t c940a7b
refactor: :recycle: updated required fields for codemeta schmea
slugb0t 6036f5a
🐛 fix: add logwatch support
megasanjay c13e7a6
🐛 fix: add json to logwatch
megasanjay 82baf3f
fix: :bug: patch json parse issue
slugb0t d4c2335
Merge branch 'staging' of https://github.com/fairdataihub/codefair-ap…
slugb0t e4428f2
fix: :bug: update logging parameters
slugb0t e648184
refactor: :recycle: point a folder above for codemeta-schema
slugb0t 771699d
refactor: :recycle: update dockerfile to include schema
slugb0t 104ae3e
fix: :bug: ensure authors have roles key
slugb0t 4132e66
refactor: :recycle: :loud_sound: convert some consola logs to logwatch
slugb0t 6fedd07
fix: :bug: roles are optional in save request
slugb0t 808b93b
chore: :loud_sound: remove dev logs
slugb0t 8edc800
doc: :memo: update changelog
slugb0t a878891
refactor: :recycle: revert roles key being optional
slugb0t 7ba12b6
fix: :bug: add logwatch.start method
slugb0t cde62bd
fix: :bug: ensure contrib and authros have roles
slugb0t 4bca8d3
Merge branch 'main' into staging
slugb0t 619880e
fix: :bug: CWL handles multiple installations
slugb0t 6fe2edb
refactor: :recycle: update log error
slugb0t 7393750
merge: :twisted_rightwards_arrows: remote-tracking branch 'origin/mai…
slugb0t 4c77ab1
feat: :sparkles: purge zenodo token when sign in is required
slugb0t 5bffc66
fix: :bug: make login fn asyncronous
slugb0t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { User } from "lucia"; | ||
|
||
export default defineEventHandler(async (event) => { | ||
protectRoute(event); | ||
|
||
const user = event.context.user as User | null; | ||
|
||
if (!user) { | ||
throw createError({ | ||
statusCode: 400, | ||
statusMessage: "Bad Request. Missing user in the URL params", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Error message is incorrect - user is expected in context, not URL params |
||
}); | ||
} | ||
|
||
// Delete only the Zenodo token from the zenodoToken table | ||
await prisma.zenodoToken.deleteMany({ | ||
where: { | ||
user_id: user.id, | ||
}, | ||
}); | ||
|
||
return { | ||
message: "Zenodo token purged", | ||
}; | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): Add preventDefault to click handler to ensure custom login flow works correctly
The anchor tag's default behavior might interfere with the custom login flow. Consider using @click.prevent="loginToZenodo".