Skip to content

Commit

Permalink
me/pending-invites: Use GET /api/private/crate_owner_invitations en…
Browse files Browse the repository at this point in the history
…dpoint
  • Loading branch information
Turbo87 committed Nov 20, 2022
1 parent 986b87d commit 4a6752a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/adapters/crate-owner-invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ export default class CrateOwnerInviteAdapter extends ApplicationAdapter {
pathForType() {
return 'crate_owner_invitations';
}

urlForQuery() {
return '/api/private/crate_owner_invitations';
}
}
4 changes: 3 additions & 1 deletion app/routes/me/pending-invites.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

0 comments on commit 4a6752a

Please sign in to comment.