File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,19 @@ func registerRoutes(r chi.Router) {
18
18
})
19
19
20
20
r .Post ("/v1/categories" , func (w http.ResponseWriter , _ * http.Request ) {
21
- w .Write ([] byte ( "TODO" ) )
21
+ w .WriteHeader ( http . StatusNoContent )
22
22
})
23
23
24
24
r .Get ("/v1/categories/{categoryId}" , func (w http.ResponseWriter , _ * http.Request ) {
25
25
w .Write ([]byte ("TODO" ))
26
26
})
27
27
28
28
r .Put ("/v1/categories/{categoryId}" , func (w http.ResponseWriter , _ * http.Request ) {
29
- w .Write ([] byte ( "TODO" ) )
29
+ w .WriteHeader ( http . StatusNoContent )
30
30
})
31
31
32
32
r .Delete ("/v1/categories/{categoryId}" , func (w http.ResponseWriter , _ * http.Request ) {
33
- w .Write ([] byte ( "TODO" ) )
33
+ w .WriteHeader ( http . StatusNoContent )
34
34
})
35
35
36
36
}
Original file line number Diff line number Diff line change @@ -17,21 +17,21 @@ endpoints.forEach(function(endpoint) {
17
17
if (endpoint .hasOwnProperty (' post' )) {
18
18
% >
19
19
r .Post (" <%- path %>" , func (w http .ResponseWriter , _ * http .Request ) {
20
- w .Write ([] byte ( " TODO " ) )
20
+ w .WriteHeader ( http . StatusNoContent )
21
21
})
22
22
< %
23
23
}
24
24
if (endpoint .hasOwnProperty (' put' )) {
25
25
% >
26
26
r .Put (" <%- path %>" , func (w http .ResponseWriter , _ * http .Request ) {
27
- w .Write ([] byte ( " TODO " ) )
27
+ w .WriteHeader ( http . StatusNoContent )
28
28
})
29
29
< %
30
30
}
31
31
if (endpoint .hasOwnProperty (' delete' )) {
32
32
% >
33
33
r .Delete (" <%- path %>" , func (w http .ResponseWriter , _ * http .Request ) {
34
- w .Write ([] byte ( " TODO " ) )
34
+ w .WriteHeader ( http . StatusNoContent )
35
35
})
36
36
< %
37
37
}
You can’t perform that action at this time.
0 commit comments