mirror of
https://github.com/safing/portbase
synced 2025-09-04 03:29:59 +00:00
Add missing newlines to api ActionFunc messages
This commit is contained in:
parent
d717d01197
commit
52d83f6edd
1 changed files with 3 additions and 0 deletions
|
@ -305,6 +305,9 @@ func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
case e.ActionFunc != nil:
|
case e.ActionFunc != nil:
|
||||||
var msg string
|
var msg string
|
||||||
msg, err = e.ActionFunc(apiRequest)
|
msg, err = e.ActionFunc(apiRequest)
|
||||||
|
if !strings.HasSuffix(msg, "\n") {
|
||||||
|
msg += "\n"
|
||||||
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
responseData = []byte(msg)
|
responseData = []byte(msg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue