ability to register a shared calendar (#118)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-09-22 20:45:02 +02:00
committed by GitHub
parent 8122772bec
commit cd724a30a0
12 changed files with 721 additions and 136 deletions
+13 -2
View File
@@ -5,12 +5,22 @@ export async function getOpenPaasUser() {
return user;
}
export async function searchUsers(query: string) {
export async function searchUsers(
query: string,
objectTypes: string[] = ["user", "contact"]
): Promise<
{
email: string;
displayName: string;
avatarUrl: string;
openpaasId: string;
}[]
> {
const response: any[] = await api
.post(`api/people/search`, {
body: JSON.stringify({
limit: 10,
objectTypes: ["user", "group", "contact", "ldap"],
objectTypes,
q: query,
}),
})
@@ -21,6 +31,7 @@ export async function searchUsers(query: string) {
displayName:
user.names?.[0]?.displayName || user.emailAddresses?.[0]?.value,
avatarUrl: user.photos?.[0]?.url || "",
openpaasId: user.id || "",
}));
}