Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reroute users to registries landing page instead of discover page for… #1956

Merged
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion lib/registries/addon/branded/index/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Route from '@ember/routing/route';

import config from 'ember-get-config';
export default class BrandedRegistriesIndexRoute extends Route {
beforeModel() {
const params: { providerId?: string } = this.paramsFor('branded');
if (params.providerId === config.defaultProvider) {
return this.replaceWith('index');
}

return this.replaceWith('branded.discover', params.providerId);
}
}
Loading