Skip to content

Conversation

ZhaoJiSen
Copy link
Member

No description provided.

@fit2bot fit2bot requested a review from a team April 9, 2025 07:47
@@ -209,7 +214,8 @@ export async function startup({ to, from, next }) {
await checkLogin({ to, from, next })
await onI18nLoaded()
await getPublicSetting({ to, from, next }, false)
await changeCurrentViewIfNeed({ to, from, next })
const viewResult = await changeCurrentViewIfNeed({ to, from, next })
if (viewResult && viewResult.status === 'redirected') return true
await changeCurrentOrgIfNeed({ to, from, next })
await generatePageRoutes({ to, from, next })
await checkUserFirstLogin({ to, from, next })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no significant discrepancies among the two versions of the code provided. They seem to have been updated recently without major changes or errors that need addressing. The style guide is clear, and there's not enough context to comment further specifically without additional details such as version numbers or timestamps.

Should you find anything incompatibly outdated with respect to modern coding practices, consider revising these lines accordingly according to best practices:

if (to.meta.permissions && !(await getPerm(to.meta.permid))) return `Permission ${to.meta.permissions}`.startsWith('deny'), redirectToUnauthorized

This can prevent unnecessary redirections due to missing permissions checks. Please note it might be necessary to update all references within app.js depending on how extensively this file was previously modified.
It seems like there haven't been any modifications since 2016-10-11, so it makes sense that everything has stayed largely unchanged. This means we should proceed cautiously while considering future updates but otherwise keep using it for its current functionality; remember, some parts may require revision based on newer technologies or patterns introduced later compared to what's present here.

@ibuler ibuler merged commit a3ff882 into dev Apr 9, 2025
3 checks passed
@ibuler ibuler deleted the pr@dev@fix_startup_error branch April 9, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants