Reorganization of backend + new routes
This commit is contained in:
@@ -3,9 +3,11 @@ package blogs
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"io"
|
||||
core "fr.latosa-escrima/api/core"
|
||||
"net/http"
|
||||
|
||||
core "fr.latosa-escrima/core"
|
||||
"fr.latosa-escrima/core/models"
|
||||
)
|
||||
|
||||
func HandleNew(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -17,7 +19,7 @@ func HandleNew(w http.ResponseWriter, r *http.Request) {
|
||||
}.Respond(w, http.StatusNoContent)
|
||||
return
|
||||
}
|
||||
var blog core.Blog
|
||||
var blog models.Blog
|
||||
if err := json.NewDecoder(r.Body).Decode(&blog); err != nil {
|
||||
core.JSONError{
|
||||
Status: core.Error,
|
||||
|
||||
Reference in New Issue
Block a user