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