mirror of
https://github.com/safing/portbase
synced 2025-09-01 01:59:48 +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:
|
||||
var msg string
|
||||
msg, err = e.ActionFunc(apiRequest)
|
||||
if !strings.HasSuffix(msg, "\n") {
|
||||
msg += "\n"
|
||||
}
|
||||
if err == nil {
|
||||
responseData = []byte(msg)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue