Started to work the shortcodes

This commit is contained in:
cdricms
2025-01-24 18:07:04 +01:00
parent 78ce2b533b
commit f1a49eea83
19 changed files with 713 additions and 38 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"reflect"
"strings"
@@ -24,15 +23,7 @@ type UpdateUserArgs struct {
func HandleUpdateUser(w http.ResponseWriter, r *http.Request) {
var updateArgs UpdateUserArgs
body, err := io.ReadAll(r.Body)
if err != nil {
core.JSONError{
Status: core.Error,
Message: err.Error(),
}.Respond(w, http.StatusInternalServerError)
return
}
err = json.Unmarshal(body, &updateArgs)
err := json.NewDecoder(r.Body).Decode(&updateArgs)
if err != nil {
core.JSONError{
Status: core.Error,