feat: allow to write to notes
This commit is contained in:
@@ -2,6 +2,7 @@ package handler
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -10,6 +11,7 @@ type ErrorResponse struct {
|
||||
}
|
||||
|
||||
func writeError(w http.ResponseWriter, code int, err error) {
|
||||
log.Printf("error: %s", err)
|
||||
writeJSON(w, code, ErrorResponse{Error: err.Error()})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user