Skip to content

Commit

Permalink
GREEN-40 relocate /removed endpoint behind debug middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
tonititi committed Apr 26, 2024
1 parent f1b8911 commit 15dd978
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,21 +184,6 @@ export function registerRoutes(server: FastifyInstance<Server, IncomingMessage,
profilerInstance.profileSectionEnd('FULL_nodelist')
})

server.get(
'/removed',
{
preHandler: async (_request, reply) => {
isDebugMiddleware(_request, reply)
},
},
(_request: FullNodeListRequest, reply) => {
profilerInstance.profileSectionStart('removed')
nestedCountersInstance.countEvent('consensor', 'removed')
reply.send(Crypto.sign({ removedAndApopedNodes: Cycles.removedAndApopedNodes }))
profilerInstance.profileSectionEnd('removed')
}
)

server.get('/archivers', (_request, reply) => {
profilerInstance.profileSectionStart('GET_archivers')
nestedCountersInstance.countEvent('consensor', 'GET_archivers')
Expand Down Expand Up @@ -911,6 +896,21 @@ export function registerRoutes(server: FastifyInstance<Server, IncomingMessage,
reply.send(res)
}
)
// Removed Endpoint
server.get(
'/removed',
{
preHandler: async (_request, reply) => {
isDebugMiddleware(_request, reply)
},
},
(_request: FullNodeListRequest, reply) => {
profilerInstance.profileSectionStart('removed')
nestedCountersInstance.countEvent('consensor', 'removed')
reply.send(Crypto.sign({ removedAndApopedNodes: Cycles.removedAndApopedNodes }))
profilerInstance.profileSectionEnd('removed')
}
)

// dataSenders Endpoint
server.get(
Expand Down

0 comments on commit 15dd978

Please sign in to comment.