@@ -44,27 +44,10 @@ func HandleDelete(w http.ResponseWriter, r *http.Request) {
44
44
}
45
45
46
46
func HandleGet (w http.ResponseWriter , r * http.Request ) {
47
- type RequestBody struct {
48
- ID string `json:"id"`
49
- }
50
47
type ResponseBody struct {
51
48
Status string `json:"status"`
52
49
}
53
50
54
- var requestBody RequestBody
55
-
56
- body , err := io .ReadAll (r .Body )
57
-
58
- if err != nil {
59
- utils .HandleError (w , err )
60
- return
61
- }
62
-
63
- if err := json .Unmarshal (body , & requestBody ); err != nil {
64
- utils .HandleError (w , err )
65
- return
66
- }
67
-
68
51
w .Header ().Set ("Content-Type" , "application/json" )
69
52
w .WriteHeader (http .StatusOK )
70
53
@@ -79,24 +62,6 @@ func HandleGet(w http.ResponseWriter, r *http.Request) {
79
62
}
80
63
81
64
func HandleHead (w http.ResponseWriter , r * http.Request ) {
82
- type RequestBody struct {
83
- ID string `json:"id"`
84
- }
85
-
86
- var requestBody RequestBody
87
-
88
- body , err := io .ReadAll (r .Body )
89
-
90
- if err != nil {
91
- utils .HandleError (w , err )
92
- return
93
- }
94
-
95
- if err := json .Unmarshal (body , & requestBody ); err != nil {
96
- utils .HandleError (w , err )
97
- return
98
- }
99
-
100
65
w .Header ().Set ("Content-Type" , "application/json" )
101
66
w .WriteHeader (http .StatusOK )
102
67
}
0 commit comments