update to accounting-api

This commit is contained in:
honzapatCZ 2024-10-30 20:50:39 +01:00
parent 8863c7bf90
commit 416f4f4539
2 changed files with 3 additions and 3 deletions

View File

@ -78,10 +78,10 @@ function useMethod({ references, state, babel }) {
let useStateHookImport = addNamed(declPath, "useState", "react"); let useStateHookImport = addNamed(declPath, "useState", "react");
let useCallbackHookImport = addNamed(declPath, "useCallback", "react"); let useCallbackHookImport = addNamed(declPath, "useCallback", "react");
let servicePath = "./" + path.relative(state.file.opts.filename, path.join(__dirname, "../services/accounting-api")).trim(); let servicePath = "@services/accounting-api";
let apiErrorImport = addNamed(declPath, "ApiError", servicePath); let apiErrorImport = addNamed(declPath, "ApiError", servicePath);
let nejServicesPath = "./" + path.relative(path.dirname(state.file.opts.filename), path.join(__dirname, "NejManager/NejProvider")).trim(); let nejServicesPath = "@utils/NejManager/NejProvider";
let emptyErrorIdentifier = declPath.scope.generateUidIdentifier("emptyErrorInternalMagic") let emptyErrorIdentifier = declPath.scope.generateUidIdentifier("emptyErrorInternalMagic")
let onErrorIdentifier = declPath.scope.generateUidIdentifier("onErrorInternalMagic") let onErrorIdentifier = declPath.scope.generateUidIdentifier("onErrorInternalMagic")
let onSuccessIdentifier = declPath.scope.generateUidIdentifier("onSuccessInternalMagic") let onSuccessIdentifier = declPath.scope.generateUidIdentifier("onSuccessInternalMagic")

View File

@ -87,7 +87,7 @@ function useQuery({ references, state, babel }) {
} }
let fullCallPathString = reduceCallee(call.callee) let fullCallPathString = reduceCallee(call.callee)
let servicePath = "./" + path.relative(state.file.opts.filename, path.join(__dirname, "../services/accounting-api")).trim(); let servicePath = "@services/accounting-api";
let apiErrorImport = addNamed(declPath, "ApiError", servicePath); let apiErrorImport = addNamed(declPath, "ApiError", servicePath);
let useStateSrc = babel.template("[DATA, CALL_SET] = USE_STATE({data: null, error: null, loading: true})")({ let useStateSrc = babel.template("[DATA, CALL_SET] = USE_STATE({data: null, error: null, loading: true})")({