diff --git a/app/adapters/crate-owner-invite.js b/app/adapters/crate-owner-invite.js index 2cf6944834..466d0c80b4 100644 --- a/app/adapters/crate-owner-invite.js +++ b/app/adapters/crate-owner-invite.js @@ -6,4 +6,8 @@ export default class CrateOwnerInviteAdapter extends ApplicationAdapter { pathForType() { return 'crate_owner_invitations'; } + + urlForQuery() { + return '/api/private/crate_owner_invitations'; + } } diff --git a/app/routes/me/pending-invites.js b/app/routes/me/pending-invites.js index af51d27432..9dc7e8d260 100644 --- a/app/routes/me/pending-invites.js +++ b/app/routes/me/pending-invites.js @@ -3,9 +3,11 @@ import { inject as service } from '@ember/service'; import AuthenticatedRoute from '../-authenticated-route'; export default class PendingInvitesRoute extends AuthenticatedRoute { + @service session; @service store; model() { - return this.store.findAll('crate-owner-invite'); + let user = this.session.currentUser; + return this.store.query('crate-owner-invite', { invitee_id: user.id }); } }