Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Thibaut Felten
projet-cdaw
Commits
97c6d41d
Commit
97c6d41d
authored
Dec 02, 2020
by
thibaut-felten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Errors solved
parent
0a5da1e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
Inscription.vue
frontend/src/views/Inscription.vue
+24
-16
Login.vue
frontend/src/views/Login.vue
+0
-2
No files found.
frontend/src/views/Inscription.vue
View file @
97c6d41d
...
...
@@ -90,22 +90,24 @@
</
style
>
<
script
>
const
user
=
require
(
"../model/user.js"
)
export
default
{
name
:
'Inscription'
,
components
:
{
LoginNavbar
},
data
(){
// the data, declared as function
return
{
// we return all the properties that should be react on.
firstname
:
""
,
lastname
:
""
,
login
:
""
,
email
:
""
,
password
:
""
,
confirmpassword
:
""
}
},
methods
:
{
name
:
'Inscription'
,
components
:
{
LoginNavbar
},
data
(){
// the data, declared as function
return
{
// we return all the properties that should be react on.
firstname
:
""
,
lastname
:
""
,
login
:
""
,
email
:
""
,
password
:
""
,
confirmpassword
:
""
}
},
methods
:
{
check
:
function
(){
let
firstname
=
this
.
firstname
let
lastname
=
this
.
lastname
...
...
@@ -146,7 +148,11 @@ export default {
fetch
(
url
,
params
)
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
console
.
log
(
data
))
.
then
(
response
=>
{
user
.
token
=
response
.
jwt_token
user
.
id
=
response
.
id
})
.
then
(
this
.
$router
.
push
(
'/'
))
}
...
...
@@ -154,5 +160,7 @@ export default {
}
import
LoginNavbar
from
'../components/LoginNavbar.vue'
</
script
>
frontend/src/views/Login.vue
View file @
97c6d41d
...
...
@@ -114,10 +114,8 @@ export default {
fetch
(
url
,
params
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
{
console
.
log
(
response
)
user
.
token
=
response
.
jwt_token
user
.
id
=
response
.
data
.
id
console
.
log
(
user
)
})
.
then
(
this
.
$router
.
push
(
"/"
))
}
...
...
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