Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleLoginUser ¶
func HandleLoginUser(w http.ResponseWriter, req *http.Request)
@title Login a user @version 1 @description Login a user with email and password given in the body @Tags authentication @accept json @produce json @success 200 {object} utils.DBUserResponse @failure 400 {object} string @failure 500 {object} string @router /auth/login [post]
func HandleRegisterUser ¶
func HandleRegisterUser(w http.ResponseWriter, req *http.Request)
@title Register a user @version 1 @description Register a user with fist name, last name, email, password and bio given in the body @Tags authentication @accept json @param data body database.User true "User details" @produce json @success 201 {object} utils.DbUserFullSchema @failure 400 {object} string @failure 500 {object} string @router /auth/register [post]
func HandleUserLogout ¶
@title Logout a user @version 1 @description Logout a user @Tags authentication @accept json @produce json @success 202 {object} utils.DBUserResponse @failure 400 {object} string @failure 500 {object} string @router /auth/logout [post]
Types ¶
This section is empty.