feat(server): improve team invite (#9092)

This commit is contained in:
DarkSky
2024-12-11 18:00:49 +08:00
committed by GitHub
parent 671c41cb1a
commit 9b0f1bb293
14 changed files with 146 additions and 46 deletions

View File

@@ -78,7 +78,7 @@ export async function inviteLink(
.send({
query: `
mutation {
inviteLink(workspaceId: "${workspaceId}", expireTime: ${expireTime})
createInviteLink(workspaceId: "${workspaceId}", expireTime: ${expireTime})
}
`,
})
@@ -86,7 +86,7 @@ export async function inviteLink(
if (res.body.errors) {
throw new Error(res.body.errors[0].message);
}
return res.body.data.inviteLink;
return res.body.data.createInviteLink;
}
export async function acceptInviteById(
@@ -187,5 +187,10 @@ export async function getInviteInfo(
`,
})
.expect(200);
if (res.body.errors) {
throw new Error(res.body.errors[0].message, {
cause: res.body.errors[0].cause,
});
}
return res.body.data.getInviteInfo;
}