Page MenuHomePhabricator

[token-server] Add database and initialize blacklist endpoints
ClosedPublic

Authored by bytesofman on Oct 27 2024, 23:35.

Details

Summary

Add a database and initialize blacklist with usable API endpoints.

Going forward, will add a way to update the blacklist without updating the repo.

Test Plan

npm test

ts-node index.ts and db is created and populated with blacklist
ctrl+c and shuts down gracefully
ts-node index.ts and db is connected, blacklist collection is not overwritten, we see console.log that it has 12 elements

Diff Detail

Repository
rABC Bitcoin ABC
Branch
token-server-blacklist-api
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30873
Build 61258: Build Difftoken-server-tests
Build 61257: arc lint + arc unit

Event Timeline

Update tests, remove unused logic, isValidTokenId function and tests

update connection to support env var for dockerized docker connection

keep db port in secrets file

This revision is now accepted and ready to land.Oct 29 2024, 13:16