This commit is contained in:
valitovgaziz
2024-08-19 21:42:05 +05:00
3 changed files with 82 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ var jwtKey = []byte(os.Getenv("SECRET_KEY"))
func Login(w http.ResponseWriter, r *http.Request) {
var creds models.Credentials
if err := json.NewDecoder(r.Body).Decode(&creds); err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.WriteHeader(http.StatusBadRequest)
return
}
// check user