clean code

This commit is contained in:
danis
2023-01-25 17:39:23 +03:00
committed by Clément Le Bihan
parent 1fa43555df
commit 0fd64bfba0

View File

@@ -492,7 +492,6 @@ export default class API {
try {
if (dataKey == 'email') {
this.getRequest('http://localhost:3000/users/24').then((res) => {
console.table(res);
console.log(oldValue, newValue);
if (res.email === oldValue) {
this.patchRequest('http://localhost:3000/users/24', {'email': newValue}).finally(() => {
@@ -502,7 +501,6 @@ export default class API {
});
} else if (dataKey == 'password') {
this.getRequest('http://localhost:3000/users/24').then((res) => {
console.table(res);
if (res.password == oldValue) {
this.patchRequest('http://localhost:3000/users/24', {'password': newValue}).finally(() => {
return resolve('password successfully changed');