feat: implement shortcut service

This commit is contained in:
Steven
2023-08-07 23:37:40 +08:00
parent 2d980380e5
commit b624576269
10 changed files with 1392 additions and 1 deletions

View File

@ -30,6 +30,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
),
)
apiv2pb.RegisterUserServiceServer(grpcServer, NewUserService(secret, store))
apiv2pb.RegisterShortcutServiceServer(grpcServer, NewShortcutService(secret, store))
return &APIV2Service{
Secret: secret,
@ -61,6 +62,9 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
if err := apiv2pb.RegisterUserServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterShortcutServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
e.Any("/api/v2/*", echo.WrapHandler(gwMux))
return nil