hftlclub / node-iltis

Node.js backend for ILTIS
MIT License
1 stars 0 forks source link

Remove restify dependency from models #42

Closed fmalcher closed 6 years ago

fmalcher commented 6 years ago

Models should be generic, self-contained and not made for a specific environment. The log models contain a dependency to restify which makes them unusable outside a restify environment.

TODO: Remove restify dependency

rweisse commented 6 years ago

The dependency inside the model itself was a copy paste error.

The dependency will stay inside the log-factory and will be used inside the toDbObject function. This is independent from the frontend. It's a backend code part. Otherwise I would have to add two extra lines in each ressouce function.

Nevertheless this could be changed with the revised logging. It wouldn't make any sense to change this now.

rweisse commented 6 years ago

But I know what you mean. You have this dependency in your frontend and have to import restify to start it. I will remove it from the factory by introducing the new logging in the next two days.

fmalcher commented 6 years ago

The solution for me wa to completely remove those models temporaily