49
This commit is contained in:
parent
f67317a49a
commit
b66d5a8f5f
@ -11,7 +11,7 @@ pub fn (mut app App) post_signup(username string, email string, password string)
|
||||
}
|
||||
return app.json(noti)
|
||||
}
|
||||
|
||||
|
||||
noti := Noti{
|
||||
status: "success",
|
||||
message: "User created successfully"
|
||||
@ -20,7 +20,7 @@ pub fn (mut app App) post_signup(username string, email string, password string)
|
||||
return app.json(noti)
|
||||
}
|
||||
|
||||
@['/controller/signup']
|
||||
@['/controller/register']
|
||||
pub fn (mut app App) controller_signup() vweb.Result{
|
||||
username := app.query["username"]
|
||||
email := app.query["email"]
|
||||
@ -32,7 +32,7 @@ pub fn (mut app App) controller_signup() vweb.Result{
|
||||
}
|
||||
return app.json(noti)
|
||||
}
|
||||
|
||||
|
||||
noti := Noti{
|
||||
status: "success",
|
||||
message: "User created successfully"
|
||||
@ -50,7 +50,7 @@ pub fn (mut app App) post_login(username string, password string) vweb.Result{
|
||||
}
|
||||
return app.json(noti)
|
||||
}
|
||||
|
||||
|
||||
return app.json(user)
|
||||
}
|
||||
|
||||
@ -65,6 +65,6 @@ pub fn (mut app App) controller_login() vweb.Result{
|
||||
}
|
||||
return app.json(noti)
|
||||
}
|
||||
|
||||
|
||||
return app.json(user)
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,4 @@ pub struct Noti {
|
||||
mut:
|
||||
status string
|
||||
message string
|
||||
}
|
||||
}
|
||||
|
@ -49,4 +49,4 @@ pub fn (mut app App) htmx_password(password string) vweb.Result{
|
||||
return app.text(htmx_get_password(htmx))
|
||||
}
|
||||
return app.text(htmx_get_password(htmx))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user