controllers

package
v0.0.0-...-6119ed1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(c *gin.Context)

Login handles the user login process. It retrieves email and password from the request body, validates them against the stored user credentials, generates a JWT token upon successful login, sets it in a cookie, and responds with success or failure.

func Signup

func Signup(c *gin.Context)

Signup handles the user signup process. It reads email and password from the request body, hashes the password, creates a new user, and responds with success or failure.

func Validate

func Validate(c *gin.Context)

Validate validates the user. It expects a user object in the context and responds with the user's details.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL