Skip to content

Commit cba4aa3

Browse files
committed
chore: adjust code for style changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 3e5555a commit cba4aa3

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

lib/interceptors/csrf-token.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export function onCsrfTokenError(axios: CancelableAxiosInstance): InterceptorErr
2828
if (config
2929
&& !config[RETRY_KEY]
3030
&& response?.status === 412
31-
&& response?.data?.message === 'CSRF check failed'
32-
) {
31+
&& response?.data?.message === 'CSRF check failed') {
3332
console.warn(`Request to ${responseURL} failed because of a CSRF mismatch. Fetching a new token`)
3433

3534
const { data: { token } } = await axios.get(generateUrl('/csrftoken'))

lib/interceptors/maintenance-mode.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ export function onMaintenanceModeError(axios: CancelableAxiosInstance): Intercep
3939
*/
4040
if (status === 503
4141
&& headers?.['x-nextcloud-maintenance-mode'] === '1'
42-
&& config?.retryIfMaintenanceMode
43-
) {
42+
&& config?.retryIfMaintenanceMode) {
4443
retryDelay *= 2
4544
if (retryDelay > 32) {
4645
console.error('Retry delay exceeded one minute, giving up.', { responseURL })

lib/interceptors/not-logged-in.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export async function onNotLoggedInError(error: unknown) {
2121
if (status === 401
2222
&& response?.data?.message === 'Current user is not logged in'
2323
&& config?.reloadExpiredSession
24-
&& window?.location
25-
) {
24+
&& window?.location) {
2625
console.error(`Request to ${responseURL} failed because the user session expired. Reloading the page …`)
2726

2827
window.location.reload()

0 commit comments

Comments
 (0)