From 7e72f6f20fd2b9ec6fae1e0f2858b69e67dc2057 Mon Sep 17 00:00:00 2001 From: Leandro Palmeira Date: Mon, 17 Mar 2025 13:48:14 -0300 Subject: [PATCH] =?UTF-8?q?Removidos=20arquivos=20in=C3=BAteis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResetPasswordService/ResetPassword.ts.bak | 48 ------------------- frontend/public/manifest.json.bak | 20 -------- 2 files changed, 68 deletions(-) delete mode 100644 backend/src/services/ResetPasswordService/ResetPassword.ts.bak delete mode 100644 frontend/public/manifest.json.bak diff --git a/backend/src/services/ResetPasswordService/ResetPassword.ts.bak b/backend/src/services/ResetPasswordService/ResetPassword.ts.bak deleted file mode 100644 index 411f45e..0000000 --- a/backend/src/services/ResetPasswordService/ResetPassword.ts.bak +++ /dev/null @@ -1,48 +0,0 @@ -import sequelize from "sequelize"; -import database from "../../database"; -import { hash } from "bcryptjs"; - -const ResetPassword = async (email: string ,token: string, password: string) => { - - const {hasResult , data} = await filterUser(email, token); - - if (!hasResult) { - return { status: 404, message: "Email não encontrado" }; - } - - if(hasResult === true){ - try{ - const convertPassword: string= await hash(password,8) - - const {hasResults , datas} = await insertHasPassword(email, token ,convertPassword); - - if (datas.length === 0){ - return { status: 404, message: "Token não encontrado" }; - } - - }catch(err){ - console.log(err) - } - } - -} -export default ResetPassword; - -const filterUser = async (email : string , token: string)=>{ - const sql = `SELECT * FROM "Users" WHERE email = '${email}' AND "resetPassword" != ''`; - const result = await database.query(sql, { type: sequelize.QueryTypes.SELECT }); - return { hasResult: result.length > 0, data: result }; -} -const insertHasPassword = async (email : string , token: string, convertPassword: string)=>{ - - - const sqlValida = `SELECT * FROM "Users" WHERE email = '${email}' AND "resetPassword" = '${token}'`; - const resultado = await database.query(sqlValida, { type: sequelize.QueryTypes.SELECT }); - - - const sqls = `UPDATE "Users" SET "passwordHash"= '${convertPassword}' , "resetPassword" = '' WHERE email= '${email}' AND "resetPassword" = '${token}'`; - const results = await database.query(sqls, { type: sequelize.QueryTypes.UPDATE }); - - - return { hasResults: results.length > 0, datas: resultado}; -} \ No newline at end of file diff --git a/frontend/public/manifest.json.bak b/frontend/public/manifest.json.bak deleted file mode 100644 index 6b51e72..0000000 --- a/frontend/public/manifest.json.bak +++ /dev/null @@ -1,20 +0,0 @@ -{ - "short_name": "Whaticket_Saas", - "name": "Whaticket_Saas", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -}