Only call advisory after being logged in#4384
Conversation
📝 WalkthroughWalkthroughTimeline guest login flow refactored to separate post-login advisory checks from general refresh logic. A new ChangesGuest login flow refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
resources/js/views/gallery-panels/Timeline.vue (1)
314-317: 💤 Low valuePrefer
.then()overasync/awaitper project convention.The handler logic is correct (advisory now fires only after a successful post-login refresh, matching the PR intent). However, as per coding guidelines, Vue3 code should chain promises with
.then()rather than usingawait.♻️ Proposed refactor
-async function onLoggedIn() { - await refresh(); - advisoryCheck(); -} +function onLoggedIn() { + refresh().then(() => advisoryCheck()); +}As per coding guidelines: "Do not use await async calls in Vue3, use .then() instead". Note
refresh()andonMountedin this file already useawait, so you may prefer to defer this for consistency.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0498bf4-16a2-4179-bd1c-c9b1291bead8
📒 Files selected for processing (1)
resources/js/views/gallery-panels/Timeline.vue
Summary by CodeRabbit
Bug Fixes