Skip to content

Commit

Permalink
Changed the order of the id parts in the http resource requests
Browse files Browse the repository at this point in the history
  • Loading branch information
macnibblet committed Mar 2, 2018
1 parent 72a6d8d commit a7959f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (h *HttpHandler) GetTemplate(w http.ResponseWriter, r *http.Request) {
return
}

template, err := h.app.templateRepo.Get(split[0], split[1])
template, err := h.app.templateRepo.Get(split[1], split[0])
if err != nil {
if err == TemplateNotFoundErr {
http.Error(w, "Template not found", 404)
Expand Down Expand Up @@ -83,7 +83,7 @@ func (h *HttpHandler) UpdateTemplate(w http.ResponseWriter, r *http.Request) {
return
}

template, err := h.app.templateRepo.Get(split[0], split[1])
template, err := h.app.templateRepo.Get(split[1], split[0])
if err != nil {
if err == TemplateNotFoundErr {
http.Error(w, "Template not found", 404)
Expand Down Expand Up @@ -134,7 +134,7 @@ func (h *HttpHandler) DeleteTemplate(w http.ResponseWriter, r *http.Request) {
return
}

template, err := h.app.templateRepo.Get(split[0], split[1])
template, err := h.app.templateRepo.Get(split[1], split[0])
if err != nil {
if err == TemplateNotFoundErr {
http.Error(w, "Template not found", 404)
Expand Down

0 comments on commit a7959f1

Please sign in to comment.