Files
threshold-ui/ui/admin/app/routes/scopes/scope/auth-methods/new.js
T

25 lines
476 B
JavaScript
Raw Normal View History

2020-08-13 16:08:45 -04:00
import Route from '@ember/routing/route';
export default class ScopesScopeAuthMethodsNewRoute extends Route {
// =attributes
queryParams = {
type: {
2021-03-05 17:27:00 -05:00
refreshModel: true,
},
};
2020-08-13 16:08:45 -04:00
// =methods
/**
* Create a new unsaved auth-method.
* @return {AuthMethodModel}
*/
model(params) {
2020-08-13 16:08:45 -04:00
const scopeModel = this.modelFor('scopes.scope');
2020-09-09 12:24:01 -04:00
return this.store.createRecord('auth-method', {
scopeModel,
type: params.type,
2020-09-09 12:24:01 -04:00
});
2020-08-13 16:08:45 -04:00
}
}