Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

me/pending-invites: Use GET /api/private/crate_owner_invitations endpoint #5501

Merged
merged 1 commit into from
Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 });
}
}