Skip to content

Commit

Permalink
fix: Solve SonarQube issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sergihejo committed Oct 28, 2024
1 parent afdec28 commit c5f38e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.7",
"bootstrap": "^5.3.3",
"crypto": "^1.0.1",
"jwt-decode": "^4.0.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/register.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useState } from 'react';
import axios from 'axios';
import crypto from 'crypto';

function Register() {
const [newUser, setNewUser] = useState({
Expand Down Expand Up @@ -35,7 +34,7 @@ function Register() {
};

const generatePassword = () => {
const password = crypto.randomBytes(12).toString('hex');
const password = Math.random().toString(36).slice(-8);
setNewUser({ ...newUser, password });
};

Expand Down

0 comments on commit c5f38e2

Please sign in to comment.