From b66d5a8f5f3ce6d6200664a03f80bb2c452effa6 Mon Sep 17 00:00:00 2001 From: libexi01 Date: Thu, 4 Jul 2024 21:19:34 +0530 Subject: [PATCH] 49 --- src/controller.v | 12 ++++++------ src/entitities.v | 2 +- src/view.v | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controller.v b/src/controller.v index 8969ebc..8600a07 100644 --- a/src/controller.v +++ b/src/controller.v @@ -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) -} \ No newline at end of file +} diff --git a/src/entitities.v b/src/entitities.v index ff930eb..a90635e 100644 --- a/src/entitities.v +++ b/src/entitities.v @@ -15,4 +15,4 @@ pub struct Noti { mut: status string message string -} \ No newline at end of file +} diff --git a/src/view.v b/src/view.v index 712b6d6..d4b4d19 100644 --- a/src/view.v +++ b/src/view.v @@ -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)) -} \ No newline at end of file +}