Skip to content

Commit 7ecadfd

Browse files
committed
fix: keep both endpoints
1 parent 6af5959 commit 7ecadfd

File tree

1 file changed

+9
-0
lines changed
  • mirage/route-handlers

1 file changed

+9
-0
lines changed

mirage/route-handlers/me.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ export function register(server) {
9898
return { ok: true };
9999
});
100100

101+
server.get('/api/v1/me/crate_owner_invitations', function (schema) {
102+
let { user } = getSession(schema);
103+
if (!user) {
104+
return new Response(403, {}, { errors: [{ detail: 'must be logged in to perform that action' }] });
105+
}
106+
107+
return schema.crateOwnerInvitations.where({ inviteeId: user.id });
108+
});
109+
101110
server.get('/api/private/crate_owner_invitations', function (schema) {
102111
let { user } = getSession(schema);
103112
if (!user) {

0 commit comments

Comments
 (0)