controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(c *gin.Context)

@Summary Login @Schemes @Description ลงชื่อเข้าใช้ระบบ @Tags Auth @Accept json @Produce json @Success 200 {object} responses.Response{} "ok" @Router /login [post]

func SignUp

func SignUp(c *gin.Context)

@Summary @Description แก้ไขข้อมูลหนังสือ @Tags Auth @Accept json @Produce json @Success 200 {object} responses.Response{} "ok" @Router /signup [post]

Types

type LoginPayload

type LoginPayload struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token string        `json:"token"`
	ID    uint          `json:"id"`
	User  entities.User `json:"user"`
	Role  string
}

type SignUpPayload

type SignUpPayload struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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