mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
fix: Avoid logging error when team not found in apex auth redirect (#12478)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -39,9 +39,12 @@ export default function apexAuthRedirect<T>({
|
||||
try {
|
||||
const team = await Team.findByPk(teamId, {
|
||||
attributes: ["id", "domain", "subdomain"],
|
||||
rejectOnEmpty: true,
|
||||
});
|
||||
|
||||
if (!team) {
|
||||
return ctx.redirect(getErrorPath(ctx));
|
||||
}
|
||||
|
||||
return parseDomain(ctx.host).teamSubdomain === team.subdomain
|
||||
? ctx.redirect("/")
|
||||
: ctx.redirectOnClient(getRedirectPath(ctx, team));
|
||||
|
||||
Reference in New Issue
Block a user