wip: currently rewriting the project as a full stack application tangled.org/kacaii.dev/sigo
gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:technologist: add body to both `/cadastrar` responses

Kacaii 43f113f9 d3f2291a

+9 -3
+9 -3
src/app/handler/signup.gleam
··· 30 30 }) 31 31 } 32 32 33 - ///  Inserts a new user account on the database 33 + ///  Inserts a new `user_account` into the database 34 34 pub fn handle_form_submission(req: wisp.Request, ctx: Context) -> wisp.Response { 35 35 use form_data <- wisp.require_form(req) 36 36 let form_result = ··· 52 52 ) 53 53 54 54 case register_result { 55 - Error(_) -> wisp.internal_server_error() 56 - Ok(_) -> wisp.created() 55 + Error(_) -> { 56 + wisp.internal_server_error() 57 + |> wisp.set_body(wisp.Text("Ocorreu um erro ao cadastrar um usuário")) 58 + } 59 + Ok(_) -> { 60 + wisp.created() 61 + |> wisp.set_body(wisp.Text("Cadastro realizado com sucesso")) 62 + } 57 63 } 58 64 } 59 65 }