package
0.0.0-20240824210650-bf60d840f3ab
Repository: https://github.com/hasbrovish/webapp-labs.git
Documentation: pkg.go.dev

# Functions

// Check for custom errors and return a friendly message if err == models.ErrUserExists { writeErrorResponse(w, http.StatusConflict, "User already exists", "User with this email already exists, please try logging in") } else { writeErrorResponse(w, http.StatusInternalServerError, "Failed to create user", "An unexpected error occurred") } return } res, _ := json.Marshal(user) w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) w.Write(res) }.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author