Fix ember-simple-auth deprication

This commit is contained in:
Stanislav Romanov 2022-08-20 18:16:52 +03:00
parent 74e59d961d
commit 11b43f6a39
4 changed files with 26 additions and 0 deletions

10
app/routes/application.js Normal file
View file

@ -0,0 +1,10 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ApplicationRoute extends Route {
@service session;
async beforeModel() {
await this.session.setup();
}
}

View file

@ -0,0 +1,2 @@
{{page-title "Application"}}
{{outlet}}

View file

@ -12,6 +12,9 @@ module.exports = function (defaults) {
'ember-power-select': {
theme: false,
},
'ember-simple-auth': {
useSessionSetupMethod: true,
},
});
return require('@embroider/compat').compatBuild(app, Webpack, {

View file

@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'meilisearch-admin/tests/helpers';
module('Unit | Route | application', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup('route:application');
assert.ok(route);
});
});