handler

package
v0.0.0-...-a4deb0f Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminDelete

func AdminDelete() func(*gin.Context)

AdminDelete godoc @Summary Admin can delete user @Description Admin can delete user @Tags admin @Accept json @Produce json @Param user_id path string true "User ID" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/admin/delete/{user_id} [delete]

func AdminSignIn

func AdminSignIn() func(*gin.Context)

AdminSignIn godoc @Summary Admin can sign in @Description Admin can sign in @Tags admin @Accept json @Produce json @Param email body string true "Email" @Param pass_word body string true "PassWord" @Param phone_number body string true "PhoneNumber" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/admin/sign_in [post]

func AdminSignUp

func AdminSignUp() func(*gin.Context)

AdminSignUp godoc @Summary Admin sign up with email and password @Description Admin sign up with email and password @Tags admin @Accept json @Produce json @Param name body string true "Name" @Param email body string true "Email" @Param pass_word body string true "PassWord" @Param phone_number body string true "PhoneNumber" @Param address body string true "Address" @Param telegram body string true "Telegram" @Param lat body float64 true "Lat" @Param long body float64 true "Long" @Param ward_id body string true "WardId" @Param ward_text body string true "WardText" @Param district_id body string true "DistrictId" @Param district_text body string true "DistrictText" @Param province_id body string true "ProvinceId" @Param province_text body string true "ProvinceText" @Param national_id body string true "NationalId" @Param national_text body string true "NationalText" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/admin/sign_up [post]

func AdminUpdate

func AdminUpdate() func(*gin.Context)

AdminUpdate godoc @Summary Admin can update information @Description Admin can update information @Tags admin @Accept json @Produce json @Param user_id path string true "User ID" @Param name body string true "Name" @Param sex body string true "Sex" @Param birth_date body string true "BirthDate" @Param telegram body string true "Telegram" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/admin/update/{user_id} [patch]

Types

type AdminUpdateResponse

type AdminUpdateResponse struct {
	Name string `json:"name"`
	//Email       string `json:"email"`
	//PhoneNumber string `json:"phone_number"`
	Sex       string `json:"sex"`
	BirthDate string `json:"birth_date"`
	Telegram  string `json:"telegram"`
}

Jump to

Keyboard shortcuts

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