Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/web/server/lib/[user]/getServerSideProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont

// EXAMPLE - context.params: { orgSlug: 'acme', user: 'member0+owner1' }
// EXAMPLE - context.query: { redirect: 'undefined', orgRedirection: 'undefined', user: 'member0+owner1' }
const originalQueryString = new URLSearchParams(context.query as Record<string, string>).toString();
const params = new URLSearchParams();
for (const [key, value] of Object.entries(context.query)) {
if (Array.isArray(value)) {
value.forEach((v) => params.append(key, v));
} else if (value !== undefined) {
params.append(key, value);
}
}
const originalQueryString = params.toString();
const destinationWithQuery = `${destinationUrl}?${originalQueryString}`;
log.debug(`Dynamic group detected, redirecting to ${destinationUrl}`);
return {
Expand Down
Loading