Adjust import paths and service urls in index.js
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
)
|
||||
@@ -21,13 +22,13 @@ func Server(opts ...Option) grpc.Service {
|
||||
grpc.Version(version.String),
|
||||
)
|
||||
|
||||
if err := proto.RegisterAccountsServiceHandler(service.Server(), handler); err != nil {
|
||||
if err := accountssvc.RegisterAccountsServiceHandler(service.Server(), handler); err != nil {
|
||||
options.Logger.Fatal().Err(err).Msg("could not register service handler")
|
||||
}
|
||||
if err := proto.RegisterGroupsServiceHandler(service.Server(), handler); err != nil {
|
||||
if err := accountssvc.RegisterGroupsServiceHandler(service.Server(), handler); err != nil {
|
||||
options.Logger.Fatal().Err(err).Msg("could not register groups handler")
|
||||
}
|
||||
if err := proto.RegisterIndexServiceHandler(service.Server(), handler); err != nil {
|
||||
if err := accountssvc.RegisterIndexServiceHandler(service.Server(), handler); err != nil {
|
||||
options.Logger.Fatal().Err(err).Msg("could not register index handler")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
chimiddleware "github.com/go-chi/chi/v5/middleware"
|
||||
"github.com/owncloud/ocis/accounts/pkg/assets"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/owncloud/ocis/ocis-pkg/account"
|
||||
"github.com/owncloud/ocis/ocis-pkg/cors"
|
||||
"github.com/owncloud/ocis/ocis-pkg/middleware"
|
||||
@@ -66,8 +67,8 @@ func Server(opts ...Option) http.Service {
|
||||
))
|
||||
|
||||
mux.Route(options.Config.HTTP.Root, func(r chi.Router) {
|
||||
proto.RegisterAccountsServiceWeb(r, handler)
|
||||
proto.RegisterGroupsServiceWeb(r, handler)
|
||||
accountssvc.RegisterAccountsServiceWeb(r, handler)
|
||||
accountssvc.RegisterGroupsServiceWeb(r, handler)
|
||||
})
|
||||
|
||||
err := micro.RegisterHandler(service.Server(), mux)
|
||||
|
||||
Reference in New Issue
Block a user