Commit af9a149c authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

add header

parent 13517339
......@@ -60,6 +60,8 @@
<v-spacer></v-spacer>
<v-toolbar-title>{{ $auth.$storage.getUniversal("userName") }}</v-toolbar-title>
<v-btn icon @click="logout">
<v-icon>mdi-export</v-icon>
</v-btn>
......
......@@ -242,19 +242,14 @@ export default {
createUser() {
const self = this
this.$axios
.post('/users/',
{
.post('/users/',{
headers: {
'Content-Type': 'application/json'
},
email: this.email,
password: this.password,
name:this.name,
},
{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${this.$auth.$storage.getUniversal("token")}`,
},
}
)
})
.then(response => {
// $bvModal.hide('modal-login');
this.$bvModal.hide('modal-login')
......@@ -281,12 +276,7 @@ export default {
if(confirm("Do you really want to delete?")){
try{
this.$axios
.delete(`/users/${userID}`,{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${this.$auth.$storage.getUniversal("token")}`,
},
})
.delete(`/users/${userID}`)
.then(response => {
console.log(response.data)
this.users.splice(this.editedIndex, 1)
......@@ -314,19 +304,10 @@ export default {
console.log(this?.eID)
try{
this.$axios
.put(`/users/${this?.eID}`,
{
.put(`/users/${this?.eID}`,{
email: this.eEmail,
password: this.ePassword,
name:this.eName,
},
{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${this.$auth.$storage.getUniversal("token")}`,
},
}
)
name:this.eName,} )
.then(response => {
self.$toast.success('User updated successfully!',{
duration: 3000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment