Skip to content

Commit

Permalink
feat(backend): remove connections route (#1940) (#2051)
Browse files Browse the repository at this point in the history
Co-authored-by: Ömer Talha Özdemir <[email protected]>
  • Loading branch information
njlie and Ömer Talha Özdemir authored Oct 18, 2023
1 parent cbe70ae commit ac288a6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 185 deletions.
22 changes: 1 addition & 21 deletions packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { HttpTokenService } from './payment-method/ilp/peer-http-token/service'
import { AssetService, AssetOptions } from './asset/service'
import { AccountingService } from './accounting/service'
import { PeerService } from './payment-method/ilp/peer/service'
import { connectionMiddleware } from './open_payments/connection/middleware'
import { createWalletAddressMiddleware } from './open_payments/wallet_address/middleware'
import { WalletAddress } from './open_payments/wallet_address/model'
import { WalletAddressService } from './open_payments/wallet_address/service'
Expand All @@ -34,10 +33,7 @@ import {
RequestAction
} from './open_payments/auth/middleware'
import { RatesService } from './rates/service'
import {
spspMiddleware,
SPSPConnectionContext
} from './payment-method/ilp/spsp/middleware'
import { spspMiddleware } from './payment-method/ilp/spsp/middleware'
import { SPSPRoutes } from './payment-method/ilp/spsp/routes'
import {
IncomingPaymentRoutes,
Expand Down Expand Up @@ -360,24 +356,8 @@ export class App {
'outgoingPaymentRoutes'
)
const quoteRoutes = await this.container.use('quoteRoutes')
const connectionRoutes = await this.container.use('connectionRoutes')
const { resourceServerSpec } = await this.container.use('openApi')

// GET /connections/{id}
router.get<DefaultState, SPSPConnectionContext>(
WALLET_ADDRESS_PATH + '/connections/:id',
connectionMiddleware,
spspMiddleware,
createValidatorMiddleware<ContextType<SPSPConnectionContext>>(
resourceServerSpec,
{
path: '/connections/{id}',
method: HttpMethod.GET
}
),
connectionRoutes.get
)

// POST /incoming-payments
// Create incoming payment
router.post<DefaultState, SignedCollectionContext<IncomingCreateBody>>(
Expand Down
8 changes: 0 additions & 8 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { createConnectorService } from './payment-method/ilp/connector'
import { createOpenAPI } from '@interledger/openapi'
import { createAuthenticatedClient as createOpenPaymentsClient } from '@interledger/open-payments'
import { createConnectionService } from './open_payments/connection/service'
import { createConnectionRoutes } from './open_payments/connection/routes'
import { createWalletAddressKeyService } from './open_payments/wallet_address/key/service'
import { createReceiverService } from './open_payments/receiver/service'
import { createRemoteIncomingPaymentService } from './open_payments/payment/incoming_remote/service'
Expand Down Expand Up @@ -292,13 +291,6 @@ export function initIocContainer(
streamServer: await deps.use('streamServer')
})
})
container.singleton('connectionRoutes', async (deps) => {
return createConnectionRoutes({
logger: await deps.use('logger'),
incomingPaymentService: await deps.use('incomingPaymentService'),
connectionService: await deps.use('connectionService')
})
})
container.singleton('receiverService', async (deps) => {
const config = await deps.use('config')
return await createReceiverService({
Expand Down
121 changes: 0 additions & 121 deletions packages/backend/src/open_payments/connection/routes.test.ts

This file was deleted.

35 changes: 0 additions & 35 deletions packages/backend/src/open_payments/connection/routes.ts

This file was deleted.

0 comments on commit ac288a6

Please sign in to comment.