Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
af9a149c
Commit
af9a149c
authored
Jan 30, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add header
parent
13517339
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
31 deletions
+14
-31
Navbar.vue
components/Navbar.vue
+2
-0
index.vue
pages/users/index.vue
+12
-31
No files found.
components/Navbar.vue
View file @
af9a149c
...
@@ -60,6 +60,8 @@
...
@@ -60,6 +60,8 @@
<v-spacer></v-spacer>
<v-spacer></v-spacer>
<v-toolbar-title>
{{ $auth.$storage.getUniversal("userName") }}
</v-toolbar-title>
<v-btn
icon
@
click=
"logout"
>
<v-btn
icon
@
click=
"logout"
>
<v-icon>
mdi-export
</v-icon>
<v-icon>
mdi-export
</v-icon>
</v-btn>
</v-btn>
...
...
pages/users/index.vue
View file @
af9a149c
...
@@ -242,19 +242,14 @@ export default {
...
@@ -242,19 +242,14 @@ export default {
createUser
()
{
createUser
()
{
const
self
=
this
const
self
=
this
this
.
$axios
this
.
$axios
.
post
(
'
/users/
'
,
.
post
(
'
/users/
'
,{
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
email
:
this
.
email
,
email
:
this
.
email
,
password
:
this
.
password
,
password
:
this
.
password
,
name
:
this
.
name
,
name
:
this
.
name
,
},
})
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)}
`
,
},
}
)
.
then
(
response
=>
{
.
then
(
response
=>
{
// $bvModal.hide('modal-login');
// $bvModal.hide('modal-login');
this
.
$bvModal
.
hide
(
'
modal-login
'
)
this
.
$bvModal
.
hide
(
'
modal-login
'
)
...
@@ -281,12 +276,7 @@ export default {
...
@@ -281,12 +276,7 @@ export default {
if
(
confirm
(
"
Do you really want to delete?
"
)){
if
(
confirm
(
"
Do you really want to delete?
"
)){
try
{
try
{
this
.
$axios
this
.
$axios
.
delete
(
`/users/
${
userID
}
`
,{
.
delete
(
`/users/
${
userID
}
`
)
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)}
`
,
},
})
.
then
(
response
=>
{
.
then
(
response
=>
{
console
.
log
(
response
.
data
)
console
.
log
(
response
.
data
)
this
.
users
.
splice
(
this
.
editedIndex
,
1
)
this
.
users
.
splice
(
this
.
editedIndex
,
1
)
...
@@ -314,19 +304,10 @@ export default {
...
@@ -314,19 +304,10 @@ export default {
console
.
log
(
this
?.
eID
)
console
.
log
(
this
?.
eID
)
try
{
try
{
this
.
$axios
this
.
$axios
.
put
(
`/users/
${
this
?.
eID
}
`,
.
put
(
`/users/
${
this
?.
eID
}
`,{
{
email: this.eEmail,
email: this.eEmail,
password: this.ePassword,
password: this.ePassword,
name:this.eName,
name:this.eName,} )
},
{
headers: {
'Content-Type': 'application/json',
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)}
`,
},
}
)
.then(response => {
.then(response => {
self.$toast.success('User updated successfully!',{
self.$toast.success('User updated successfully!',{
duration: 3000
duration: 3000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment