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
Hide 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 @@
<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>
...
...
pages/users/index.vue
View file @
af9a149c
...
...
@@ -242,19 +242,14 @@ export default {
createUser
()
{
const
self
=
this
this
.
$axios
.
post
(
'
/users/
'
,
{
email
:
this
.
email
,
password
:
this
.
password
,
name
:
this
.
name
,
.
post
(
'
/users/
'
,{
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)}
`
,
},
}
)
email
:
this
.
email
,
password
:
this
.
password
,
name
:
this
.
name
,
})
.
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
}
`,
{
email: this.eEmail,
password: this.ePassword,
name:this.eName,
},
{
headers: {
'Content-Type': 'application/json',
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)}
`,
},
}
)
.
put
(
`/users/
${
this
?.
eID
}
`,{
email: this.eEmail,
password: this.ePassword,
name:this.eName,} )
.then(response => {
self.$toast.success('User updated successfully!',{
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