forked from FabianVowie/Lithium
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
233 B
13 lines
233 B
package controllers
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func writeError(w http.ResponseWriter, status int, errStr string) {
|
|
w.WriteHeader(status)
|
|
json.NewEncoder(w).Encode(struct {
|
|
Error string `json:"error"`
|
|
}{errStr})
|
|
}
|