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