update to accounting-api
This commit is contained in:
parent
8863c7bf90
commit
416f4f4539
|
|
@ -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")
|
||||||
|
|
|
||||||
|
|
@ -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})")({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user