From 60f23068a1d91bd3b0d0557e945bdd5700e4ede0 Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Wed, 1 Mar 2023 17:05:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-90807=20fix:=20=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=8A=A0=E8=A7=A3=E5=AF=86=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/crud.service.ts | 6 +++--- src/modules/crud/decision.api.ts | 4 ++-- types/globals.d.ts | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/crud/crud.service.ts b/src/modules/crud/crud.service.ts index 19297e7..71c9604 100644 --- a/src/modules/crud/crud.service.ts +++ b/src/modules/crud/crud.service.ts @@ -15,7 +15,7 @@ export function requestGet(url: string, data?: any): Promise { export function requestPost(url: string, data = {}): Promise { return new Promise(resolve => { - Dec.reqPost(getFullUrl(url), data, re => { + Dec.reqByEncrypt("POST", getFullUrl(url), data, re => { resolve(re); }); }); @@ -23,7 +23,7 @@ export function requestPost(url: string, data = {}): Promise { export function requestDelete(url: string, data = {}) { return new Promise(resolve => { - Dec.reqDelete(getFullUrl(url), data, re => { + Dec.reqByEncrypt("DELETE", getFullUrl(url), data, re => { resolve(re); }); }); @@ -31,7 +31,7 @@ export function requestDelete(url: string, data = {}) { export function requestPut(url: string, data = {}) { return new Promise(resolve => { - Dec.reqPut(getFullUrl(url), data, re => { + Dec.reqByEncrypt("PUT", getFullUrl(url), data, re => { resolve(re); }); }); diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index b23c31b..a77f406 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -108,12 +108,12 @@ export class DecisionApi implements Api { getCipher(password: string) { return BI.Providers.getProvider('dec.provider.cipher') - .getCipher(password); + .getCompleteCipher(password); } getPlain(cipher: string) { return BI.Providers.getProvider('dec.provider.cipher') - .getPlain(cipher); + .getCompletePlain(cipher); } getHyperlink(name: string) { diff --git a/types/globals.d.ts b/types/globals.d.ts index 4d1c456..01b04b0 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -16,6 +16,7 @@ declare const Dec: { personal: { username: string; }; + reqByEncrypt: (method: string, url: string, data?: any, config?: Obj) => {}, socketEmit: (type: string, name: string, callback: (re: any) => void) => void; // req reqGet: RequestFunction; From 3b6e365777af6b14246d0c6bf4c558fb59b60a94 Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Wed, 1 Mar 2023 17:13:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=8B=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- types/globals.d.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5431bfb..6d411c8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@types/jest": "24.0.11", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", - "axios": "0.18.0", + "axios": "^0.24.0", "babel-loader": "8.0.6", "body-parser": "1.18.3", "chokidar": "2.1.5", diff --git a/types/globals.d.ts b/types/globals.d.ts index 01b04b0..6dcba21 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -1,3 +1,4 @@ +import type { Method, AxiosRequestConfig } from 'axios'; interface Obj { [key: string]: any; } @@ -16,7 +17,7 @@ declare const Dec: { personal: { username: string; }; - reqByEncrypt: (method: string, url: string, data?: any, config?: Obj) => {}, + reqByEncrypt: (method: Method, url: string, data?: any, config?: AxiosRequestConfig) => {}, socketEmit: (type: string, name: string, callback: (re: any) => void) => void; // req reqGet: RequestFunction;