Add sample support, re-organize repo

This commit is contained in:
Kevin Thomas
2021-09-24 00:35:18 -07:00
parent b9e340c26a
commit f2d1b80673
23 changed files with 703 additions and 524 deletions

29
src/components/login.js Normal file
View File

@@ -0,0 +1,29 @@
export default {
data: () => ({
valid: false,
username: '',
password: '',
usernameRules: [
v => !!v || 'Username is required'
],
passwordRules: [
v => !!v || 'Password is required'
]
}),
methods: {
login () {
this.$http.post('/login/password', {
username: this.username,
password: this.password
})
.then(response => {
if (response.status === 200) {
this.$router.push('/')
}
})
.catch((error) => {
console.error(error.response)
})
}
}
}