R
Size: a a a
R
A
R
Е
A
A
🏡К
el
ЧВ
Е
el
npm config get registry
el
npm config get registry
А
async/await
функции возвращать ошибку так: return Promise.reject(e)
, а не через throw
; [HTTP_DELETE]: async (
{ rootState, commit },
{
method,
params,
body = {},
with_token = true,
no_commit = false,
...args
}
) => {
const config = {};
if (with_token) {
config.headers = {
Authorization: "Bearer " + rootState.Auth.userToken
};
}
commit(LOADING, {
name: method,
value: "loading"
});
commit(REMOVE_ERROR, method);
try {
let request = await axios.delete(
getUrl(path[method], params, args.calcUrl),
config
);
commit(LOADING, {
name: method,
value: "loaded"
});
return request; } catch (e) {
await handleError(e, commit, method);
return Promise.reject(e) }
},
SB
Ш
SB
SB
KP
KP
i@