From 4c094c4710046da9ffd2b06f65e223527aa7f53c Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 16 Jan 2022 18:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E7=BD=AE=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=A7=98=E9=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/open.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/back/services/open.ts b/back/services/open.ts index 388587c8..2681c4ec 100644 --- a/back/services/open.ts +++ b/back/services/open.ts @@ -54,7 +54,17 @@ export default class OpenService { } public async resetSecret(id: number): Promise { - const tab: any = { client_secret: createRandomString(24, 24), tokens: [] }; + const tab: any = { + client_secret: createRandomString(24, 24), + tokens: [], + id, + }; + // const doc = await this.get(id); + // const tab = new App({ ...doc }); + // tab.client_secret = createRandomString(24, 24); + // tab.tokens = []; + // const newDoc = await this.updateDb(tab); + // return newDoc; const newDoc = await this.updateDb(tab); return newDoc; }