2020-08-13 16:08:45 -04:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
|
|
|
|
|
|
export default class ScopesScopeAuthMethodsNewRoute extends Route {
|
2021-01-05 17:41:02 -05:00
|
|
|
// =attributes
|
|
|
|
|
|
|
|
|
|
queryParams = {
|
|
|
|
|
type: {
|
2021-03-05 17:27:00 -05:00
|
|
|
refreshModel: true,
|
|
|
|
|
},
|
2021-01-05 17:41:02 -05:00
|
|
|
};
|
|
|
|
|
|
2020-08-13 16:08:45 -04:00
|
|
|
// =methods
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new unsaved auth-method.
|
|
|
|
|
* @return {AuthMethodModel}
|
|
|
|
|
*/
|
2021-01-05 17:41:02 -05:00
|
|
|
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,
|
2021-01-05 17:41:02 -05:00
|
|
|
type: params.type,
|
2020-09-09 12:24:01 -04:00
|
|
|
});
|
2020-08-13 16:08:45 -04:00
|
|
|
}
|
|
|
|
|
}
|