Fixing http server

This commit is contained in:
Benedikt Kulmann
2020-04-22 11:27:42 +02:00
parent ea37e22f55
commit 55db2f72d0
5 changed files with 15 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by fileb0x at "2020-04-22 09:25:46.434104 +0200 CEST m=+0.005074795" from config file "embed.yml" DO NOT EDIT.
// modification hash(39a5e5bc3b3880bb6d929622e4d8ad9d.8058aec596c5fb73022d09bb97af796e)
// Code generated by fileb0x at "2020-04-22 10:33:13.646376 +0200 CEST m=+0.007895650" from config file "embed.yml" DO NOT EDIT.
// modification hash(11bae401e76f7a8a768e1594cbb3ea28.8058aec596c5fb73022d09bb97af796e)
package assets

View File

@@ -140,9 +140,16 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
Name: "grpc-addr",
Value: "0.0.0.0:9191",
Usage: "Address to bind grpc server",
EnvVars: []string{"HELLO_GRPC_ADDR"},
EnvVars: []string{"SETTINGS_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
},
&cli.StringFlag{
Name: "asset-path",
Value: "",
Usage: "Path to custom assets",
EnvVars: []string{"SETTINGS_ASSET_PATH"},
Destination: &cfg.Asset.Path,
},
&cli.StringFlag{
Name: "grpc-namespace",
Value: "com.owncloud.api",

View File

@@ -77,10 +77,10 @@ func (h *webBundleServiceHandler) ListSettingsBundles(w http.ResponseWriter, r *
resp := &ListSettingsBundlesResponse{}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, err.Error(), http.StatusPreconditionFailed)
return
}
//if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// http.Error(w, err.Error(), http.StatusPreconditionFailed)
// return
//}
if err := h.h.ListSettingsBundles(
context.Background(),

View File

@@ -2,7 +2,6 @@ package svc
import (
"context"
"github.com/owncloud/ocis-settings/pkg/settings"
store "github.com/owncloud/ocis-settings/pkg/store/filesystem"

View File

@@ -1,5 +1,5 @@
# backend
-r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/ocis-settings-debug && bin/ocis-settings-debug --log-level debug server --debug-pprof --debug-zpages'
-r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/ocis-settings-debug && bin/ocis-settings-debug --log-level debug server --debug-pprof --debug-zpages --asset-path assets/'
# frontend
-r '^ui/.*\.(vue|js)$' -R '^node_modules/' -- sh -c 'yarn build'