Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authDB/commit/4fee6063a03f58be1916cec195d4e9587c4c1367?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
7 additions and
7 deletions
cmd/main.go
internal/transport/grpc/grpc.go
@ -27,7 +27,7 @@ func main() {
}
//
fmt . Printf ( "authDBService up in %d port\n" , config . App . Port )
fmt . Printf ( "authDBServer up (%s)\n" , connStr )
eru := s . Serve ( lis )
if eru != nil {
log . Fatal ( eru )
@ -19,22 +19,22 @@ type user struct {
Confirmed bool
}
type gRPC Server struct {
type authDB Server struct {
mu sync . Mutex
users map [ string ] * user
api . UnimplementedAuthDBServer
id int32
}
func NewServer ( ) * gRPC Server {
return & gRPC Server{
func NewServer ( ) * authDB Server {
return & authDB Server{
mu : sync . Mutex { } ,
users : make ( map [ string ] * user ) ,
id : 0 ,
}
}
func ( s * gRPC Server) Login ( ctx context . Context , req * api . LoginRequest ) ( * api . LoginResponse , error ) {
func ( s * authDB Server) Login ( ctx context . Context , req * api . LoginRequest ) ( * api . LoginResponse , error ) {
s . mu . Lock ( )
defer s . mu . Unlock ( )
@ -59,7 +59,7 @@ func (s *gRPCServer) Login(ctx context.Context, req *api.LoginRequest) (*api.Log
} , nil
}
func ( s * gRPC Server) Registration ( ctx context . Context , req * api . RegistrationRequest ) ( * api . RegistrationResponse , error ) {
func ( s * authDB Server) Registration ( ctx context . Context , req * api . RegistrationRequest ) ( * api . RegistrationResponse , error ) {
s . mu . Lock ( )
defer s . mu . Unlock ( )
@ -115,7 +115,7 @@ func (s *gRPCServer) Registration(ctx context.Context, req *api.RegistrationRequ
} , nil
}
func ( s * gRPC Server) Confirmation ( ctx context . Context , req * api . ConfirmationRequest ) ( * api . ConfirmationResponse , error ) {
func ( s * authDB Server) Confirmation ( ctx context . Context , req * api . ConfirmationRequest ) ( * api . ConfirmationResponse , error ) {
s . mu . Lock ( )
defer s . mu . Unlock ( )