pl-fe: fetching head has bad compatibility, actually
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -46,7 +46,7 @@ interface StandaloneCheckSuccessAction {
|
||||
}
|
||||
|
||||
const checkIfStandalone = () => (dispatch: AppDispatch) =>
|
||||
staticFetch('/api/v1/instance', { method: 'HEAD' })
|
||||
staticFetch('/api/v1/instance', { method: 'GET' })
|
||||
.then(({ ok, headers }) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: ok && !!headers.get('content-type')?.includes('application/json') }))
|
||||
.catch((err) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: err.response?.ok }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user