forked from Onlineberatung/onlineBeratung-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into OB-Sync
- Loading branch information
Showing
100 changed files
with
13,102 additions
and
19,922 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { endpoints } from '../resources/scripts/endpoints'; | ||
import { | ||
fetchData, | ||
FETCH_METHODS, | ||
FETCH_ERRORS, | ||
FETCH_SUCCESS | ||
} from './fetchData'; | ||
|
||
export const apiJoinGroupChat = async (roomId: string): Promise<any> => | ||
fetchData({ | ||
url: endpoints.videocallServiceBase + '/join/' + roomId, | ||
method: FETCH_METHODS.POST, | ||
responseHandling: [ | ||
FETCH_ERRORS.CONFLICT, | ||
FETCH_ERRORS.CATCH_ALL, | ||
FETCH_SUCCESS.CONTENT | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,20 @@ | ||
import { endpoints } from '../resources/scripts/endpoints'; | ||
import { getValueFromCookie } from '../components/sessionCookie/accessSessionCookie'; | ||
import { | ||
getErrorCaseForStatus, | ||
redirectToErrorPage | ||
} from '../components/error/errorHandling'; | ||
|
||
export const apiKeycloakLogout = (): Promise<any> => | ||
new Promise((resolve, reject) => { | ||
const url = endpoints.keycloakLogout; | ||
const refreshToken = getValueFromCookie('refreshToken'); | ||
const data = `client_id=app&grant_type=refresh_token&refresh_token=${refreshToken}`; | ||
export const apiKeycloakLogout = async (): Promise<any> => { | ||
const url = endpoints.keycloakLogout; | ||
const refreshToken = getValueFromCookie('refreshToken'); | ||
const data = `client_id=app&grant_type=refresh_token&refresh_token=${refreshToken}`; | ||
|
||
const req = new Request(url, { | ||
return fetch( | ||
new Request(url, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/x-www-form-urlencoded', | ||
'cache-control': 'no-cache' | ||
}, | ||
credentials: 'include', | ||
body: data | ||
}); | ||
|
||
fetch(req) | ||
.then((response) => { | ||
if (response.status === 204) { | ||
resolve(response); | ||
} else { | ||
const error = getErrorCaseForStatus(response.status); | ||
redirectToErrorPage(error); | ||
reject(new Error('keycloakLogout')); | ||
} | ||
}) | ||
.catch((error) => { | ||
reject(error); | ||
}); | ||
}); | ||
}) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
import { endpoints } from '../resources/scripts/endpoints'; | ||
import { fetchData, FETCH_METHODS, FETCH_SUCCESS } from './fetchData'; | ||
import { | ||
fetchData, | ||
FETCH_METHODS, | ||
FETCH_SUCCESS, | ||
FETCH_ERRORS | ||
} from './fetchData'; | ||
|
||
export const apiStartVideoCall = async ( | ||
sessionId: number, | ||
initiatorDisplayName: string | ||
initiatorDisplayName: string, | ||
groupId?: number | ||
): Promise<{ moderatorVideoCallUrl: string }> => { | ||
const url = endpoints.startVideoCall; | ||
const videoCallData = JSON.stringify({ | ||
sessionId: sessionId, | ||
groupChatId: groupId, | ||
initiatorDisplayName: initiatorDisplayName | ||
}); | ||
|
||
return fetchData({ | ||
url: url, | ||
method: FETCH_METHODS.POST, | ||
bodyData: videoCallData, | ||
responseHandling: [FETCH_SUCCESS.CONTENT], | ||
responseHandling: [FETCH_SUCCESS.CONTENT, FETCH_ERRORS.CATCH_ALL], | ||
rcValidation: true | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/components/E2EEncryptionSupportBanner/E2EEncryptionSupportBanner.styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.