Page MenuHomePhabricator

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

Authored by bytesofman on Sun, Oct 27, 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 30890
Build 61284: Build Difftoken-server-tests
Build 61283: 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.Tue, Oct 29, 13:16