Skip to content

Commit 0f1de10

Browse files
committed
Merge branch 'refactor-improve-makerequest' of https://github.com/diary-spo/web into refactor-improve-makerequest
2 parents 1a24b7f + 12bb512 commit 0f1de10

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.env.development

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
PUBLIC_SERVER_URL=https://api.spo-diary.ru/v2
2-
PUBLIC_SERVER_URL_SECOND=https://diary.kopchan7.keenetic.link/v2
1+
# PUBLIC_SERVER_URL=https://api.spo-diary.ru/v2
2+
# PUBLIC_SERVER_URL_SECOND=https://diary.kopchan7.keenetic.link/v2
3+
4+
PUBLIC_SERVER_URLS=https://api.spo-diary.ru/v2,https://diary.kopchan7.keenetic.link/v2
35

46
PUBLIC_MODE=dev
7+
58
PUBLIC_BUNDLE_ANALYZE=true yarn build
9+
610
PUBLIC_BETA_VERSION=2.0.2
711
# main 51740302
812
# test 51723411

src/config/env.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const BASE_URLS = (process.env.PUBLIC_SERVER_URLS).split(',')
1+
export const BASE_URLS = (process.env.PUBLIC_SERVER_URLS)?.split(',')
22
export const MODE = process.env.PUBLIC_MODE
33
export const BETA_VERSION = process.env.PUBLIC_BETA_VERSION
44

src/methods/makeRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const makeRequest = async <T>(
2626

2727
clearTimeout(timeoutId)
2828

29-
/** В случае ошибки авторизации мы не делаем запрос на второй сервер, а сразу возвращаем ответ **/
29+
/** В случае ошибки авторизации мы не делаем запрос на другой сервер, а сразу возвращаем ответ **/
3030
if (response.status === HTTP_STATUSES.UNAUTHORIZED) {
3131
return response
3232
}

0 commit comments

Comments
 (0)