Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -91,7 +91,7 @@ describe("CalendarSearch", () => {
|
|||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(mockedGetCalendars).toHaveBeenCalledWith(
|
expect(mockedGetCalendars).toHaveBeenCalledWith(
|
||||||
"user123",
|
"user123",
|
||||||
"sharedPublic=true&withRights=true"
|
"sharedPublic=true&"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ describe("CalendarSearch", () => {
|
|||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(mockedGetCalendars).toHaveBeenCalledWith(
|
expect(mockedGetCalendars).toHaveBeenCalledWith(
|
||||||
"user123",
|
"user123",
|
||||||
"sharedPublic=true&withRights=true"
|
"sharedPublic=true&"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ describe("Calendar API", () => {
|
|||||||
const calendars = await getCalendars(mockUserId);
|
const calendars = await getCalendars(mockUserId);
|
||||||
|
|
||||||
expect(api.get).toHaveBeenCalledWith(
|
expect(api.get).toHaveBeenCalledWith(
|
||||||
`dav/calendars/${mockUserId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true`,
|
`dav/calendars/${mockUserId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&`,
|
||||||
{
|
{
|
||||||
headers: { Accept: "application/calendar+json" },
|
headers: { Accept: "application/calendar+json" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ export default function CalendarSearch({
|
|||||||
value.map(async (user: User) => {
|
value.map(async (user: User) => {
|
||||||
const cals = (await getCalendars(
|
const cals = (await getCalendars(
|
||||||
user.openpaasId,
|
user.openpaasId,
|
||||||
"sharedPublic=true&withRights=true"
|
"sharedPublic=true&"
|
||||||
)) as Record<string, any>;
|
)) as Record<string, any>;
|
||||||
return cals._embedded?.["dav:calendar"]
|
return cals._embedded?.["dav:calendar"]
|
||||||
? cals._embedded["dav:calendar"].map(
|
? cals._embedded["dav:calendar"].map(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { api } from "../../utils/apiUtils";
|
|||||||
|
|
||||||
export async function getCalendars(
|
export async function getCalendars(
|
||||||
userId: string,
|
userId: string,
|
||||||
scope: string = "personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true",
|
scope: string = "personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&",
|
||||||
signal?: AbortSignal
|
signal?: AbortSignal
|
||||||
) {
|
) {
|
||||||
const calendars = await api
|
const calendars = await api
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export const getTempCalendarsListAsync = createAsyncThunk<
|
|||||||
|
|
||||||
const calendars = (await getCalendars(
|
const calendars = (await getCalendars(
|
||||||
tempUser.openpaasId ?? "",
|
tempUser.openpaasId ?? "",
|
||||||
"sharedPublic=true&WithRights=true"
|
"sharedPublic=true&"
|
||||||
)) as Record<string, any>;
|
)) as Record<string, any>;
|
||||||
const rawCalendars = calendars._embedded["dav:calendar"];
|
const rawCalendars = calendars._embedded["dav:calendar"];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user