feat: Add "Send Invitation Email" action to User Invitation flow (#4113)

This commit is contained in:
DacongDA
2025-08-21 18:53:43 +08:00
committed by GitHub
parent f7bc822087
commit a23033758f
68 changed files with 424 additions and 29 deletions

View File

@@ -89,3 +89,14 @@ export function verifyInvitation(owner, name) {
},
}).then(res => res.json());
}
export function sendInvitation(invitation, destinations) {
return fetch(`${Setting.ServerUrl}/api/send-invitation?id=${invitation.owner}/${encodeURIComponent(invitation.name)}`, {
method: "POST",
credentials: "include",
body: JSON.stringify(destinations),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}