Skip to content

Commit 45d9027

Browse files
committed
feat: add package ownership transfers and extend skill transfers with org support
1 parent bff5a25 commit 45d9027

File tree

13 files changed

+1375
-128
lines changed

13 files changed

+1375
-128
lines changed

convex/httpApiV1.handlers.test.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,18 +2153,25 @@ describe("httpApiV1 handlers", () => {
21532153
user: { handle: "p" },
21542154
} as never);
21552155

2156+
let transferQueryCount = 0;
21562157
const runQuery = vi.fn(async (_query: unknown, args: Record<string, unknown>) => {
21572158
if (isRateLimitArgs(args)) return okRate();
21582159
if ("userId" in args) {
2159-
return [
2160-
{
2161-
_id: "skillOwnershipTransfers:1",
2162-
skill: { _id: "skills:1", slug: "demo", displayName: "Demo" },
2163-
fromUser: { _id: "users:2", handle: "alice", displayName: "Alice" },
2164-
requestedAt: 100,
2165-
expiresAt: 200,
2166-
},
2167-
];
2160+
transferQueryCount++;
2161+
// First call is skill transfers, second is package transfers
2162+
if (transferQueryCount === 1) {
2163+
return [
2164+
{
2165+
_id: "skillOwnershipTransfers:1",
2166+
type: "skill",
2167+
skill: { _id: "skills:1", slug: "demo", displayName: "Demo" },
2168+
fromUser: { _id: "users:2", handle: "alice", displayName: "Alice" },
2169+
requestedAt: 100,
2170+
expiresAt: 200,
2171+
},
2172+
];
2173+
}
2174+
return [];
21682175
}
21692176
return null;
21702177
});

0 commit comments

Comments
 (0)