Skip to content
Snippets Groups Projects
Commit d6e37b67 authored by danielmyren's avatar danielmyren
Browse files

notes

parent 22f96055
No related branches found
No related tags found
No related merge requests found
......@@ -23,4 +23,35 @@ https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-20-query
{{ register_form.password_confirm( placeholder = "Confirm Password") }}
{{ register_form.submit() }}
</form>
```
```js
const handleRegister = async (e) => {
e.preventDefault();
try {
const response = await axios.post('http://127.0.0.1:5000/', {
username,
email,
password
}, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
console.log('Login successful!', response.data);
// Redirect user to another page upon successful login
//history.push('/dashboard'); // Example: redirect to '/dashboard' route
} catch (error) {
console.error('Login failed!', error);
// Handle login error, display message to the user, etc.
}
console.log("Register attempt with username: " + username+ " and password:" +password);
// Redirect user to another page upon successful login
};
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment