Skip to content

Commit 2480a41

Browse files
author
Hugo Marcellin
committed
Remove mutualized functions
1 parent 4e3d87f commit 2480a41

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/utils/rest-api.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {
1414
ElementType,
1515
getRequestParamFromList,
1616
fetchEnv,
17+
backendFetchJson,
18+
backendFetch,
1719
} from '@gridsuite/commons-ui';
1820

1921
const PREFIX_USER_ADMIN_SERVER_QUERIES =
@@ -118,21 +120,11 @@ function safeFetch(url, initCopy) {
118120
);
119121
}
120122

121-
export function backendFetch(url, init, token) {
122-
const initCopy = prepareRequest(init, token);
123-
return safeFetch(url, initCopy);
124-
}
125-
126123
export function backendFetchText(url, init, token) {
127124
const initCopy = prepareRequest(init, token);
128125
return safeFetch(url, initCopy).then((safeResponse) => safeResponse.text());
129126
}
130127

131-
export function backendFetchJson(url, init, token) {
132-
const initCopy = prepareRequest(init, token);
133-
return safeFetch(url, initCopy).then((safeResponse) => safeResponse.json());
134-
}
135-
136128
const getContingencyUriParamType = (contingencyListType) => {
137129
switch (contingencyListType) {
138130
case ContingencyListType.SCRIPT.id:

0 commit comments

Comments
 (0)