Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GREEN-40 relocate the /removed endpoint behind debug middleware #10

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading