From d0d1d6e396056956f7608dbc6c42cce3d4282697 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Tue, 23 Aug 2022 21:50:12 -0600 Subject: [PATCH] add reset user pasword function to app service --- api-gateway/src/app.service.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api-gateway/src/app.service.ts b/api-gateway/src/app.service.ts index 2ce6a609..1f48ca48 100644 --- a/api-gateway/src/app.service.ts +++ b/api-gateway/src/app.service.ts @@ -225,6 +225,22 @@ export class AppService { .pipe(map((message: string) => ({ message }))); } + resetUserPassword(id: string, dni: string, name: string, last_name: string, email: string, phone: number + , user_type: string, status: string, date_entry: Date, community_id: string) { + const pattern = { cmd: 'resetUserPassword' }; + + const payload = { + id: id, dni: dni, name: name, last_name: last_name, email: email, phone: phone, + password: this.generatePassword(), user_type: user_type, status: status, date_entry: date_entry, community_id + + }; + return this.clientUserApp + .send(pattern, payload) + .pipe( + map((message: string) => ({ message })), + ); + } + allUsersAdminSistema() { const pattern = { cmd: 'findAdminSistema' }; const payload = {};