Category : mysql

This is the code, it takes the password from a file called model.py and it should compare this password with the password from angular, but it returns that it is false every time @app.route(‘/login’, methods = [‘POST’]) def login(): json_data = request.get_json() utente = UTENTE(**json_data) utente.PASSWORD = generate_password_hash(‘secret’, 10) user = UTENTE.query.filter_by(USERNAME=json_data[‘USERNAME’]) password = check_password_hash(utente.PASSWORD ..

Read more

I have a entity with a Date property from package java.util. I store the entity in MySql with JPA. Java entity: @Entity public class Foo { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private Date date; } Storing entity method: @PostMapping("/foo") public Foo create(@RequestBody Foo foo) { foo.setDate(new Date()); return fooRepository.save(foo); } The request returns ..

Read more