Begin implementing SFTP server code

This commit is contained in:
Dane Everitt
2019-12-07 15:53:07 -08:00
parent 4a68eabd1b
commit 865c1b3bad
7 changed files with 114 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"
"github.com/pkg/errors"
"github.com/pterodactyl/wings/parser"
"go.uber.org/zap"
)
@@ -39,10 +40,9 @@ func (r *PanelRequest) GetServerConfiguration(uuid string) (*ServerConfiguration
r.Response = resp
if r.HasError() {
e, err := r.Error()
zap.S().Warnw("got error", zap.String("message", e), zap.Error(err))
zap.S().Warnw("got error", zap.String("message", r.Error()))
return nil, err
return nil, errors.WithStack(errors.New(r.Error()))
}
res := &ServerConfiguration{}