started with post editor

This commit is contained in:
u80864958
2025-04-11 15:38:04 +02:00
parent fb2d784421
commit efe902639e
29 changed files with 387 additions and 16 deletions

View File

@ -14,8 +14,8 @@ import (
func Login(username, password string, secret []byte) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var login model.Login
if err := json.NewDecoder(r.Response.Request.Body).Decode(&login); err != nil {
login := model.Login{}
if err := json.NewDecoder(r.Body).Decode(&login); err != nil {
w.WriteHeader(http.StatusUnauthorized)
return
}