add get card method
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-24 01:10:31 +07:00
parent 4bd82a34a1
commit 8fbeae6fc1
12 changed files with 685 additions and 137 deletions
+6 -3
View File
@@ -2,8 +2,9 @@ package main
import (
"cake_crm/internal/app"
"cake_crm/internal/models/messenger/telegram"
"cake_crm/internal/models/storage/storage_file"
"cake_crm/internal/modules/messenger/telegram"
"cake_crm/internal/modules/storage/storage_file"
"cake_crm/internal/services/card"
proto "cake_crm/proto"
"context"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
@@ -19,6 +20,8 @@ import (
func main() {
storage := storage_file.NewStorageFile()
cardService := card.NewService(storage)
tokenData, err := os.ReadFile("resources/order_bot_token.txt")
if err != nil {
panic(err)
@@ -42,7 +45,7 @@ func main() {
// Create a gRPC server object
s := grpc.NewServer()
// Attach the Greeter service to the server
proto.RegisterCRMServer(s, app.NewServer(storage, messenger))
proto.RegisterCRMServer(s, app.NewServer(storage, messenger, cardService))
// Serve gRPC server
log.Println("Serving gRPC on 0.0.0.0:8080")
go func() {