BitcreditProtocol / E-Bill

Core for Bitcredit project.
https://www.bit.cr/
MIT License
12 stars 2 forks source link

Implement middleware for checking if Identity has been created #193

Open zupzup opened 3 weeks ago

zupzup commented 3 weeks ago

If no identity has been created yet, all endpoints except the identity-related ones should return Not acceptable.

Currently this is implemented by checking for the identity file to exist and is implemented in all handlers manually.

Create an is_identity_initialized middleware, or something, which does a proper check and include it everywhere necessary.