mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 09:32:20 -05:00
fix: return null on no orgId
This commit is contained in:
@@ -228,8 +228,8 @@ export const getFullOrganization = createAuthEndpoint(
|
||||
const session = ctx.context.session;
|
||||
const orgId = ctx.query.orgId || session.session.activeOrganizationId;
|
||||
if (!orgId) {
|
||||
throw new APIError("BAD_REQUEST", {
|
||||
message: "Organization not found",
|
||||
return ctx.json(null, {
|
||||
status: 400,
|
||||
});
|
||||
}
|
||||
const adapter = getOrgAdapter(ctx.context.adapter, ctx.context.orgOptions);
|
||||
|
||||
Reference in New Issue
Block a user