Closed ilabacheuski closed 7 years ago
What do you suggest? :)
Delete unused function. If no one use it - why is it here?
Perhaps it was originally supposed to be a central function to verify password. This "central" function would be used from user/login handler and also would be available through "api" to any custom user handlers.
Maybe we could also just add it to the handler API (in this function: https://github.com/apiko-rest-api/apiko/blob/master/src/ender.js#L258 ), so it is available to everyone and just use it in user/login.js from there.
Now it's just a code without usage. That's all. 😄 We can change it od course. And I don't think it should be in data module. It's authorization logic.
Where do you think it should be?
Right now I think we can delete it safely. If we need it in future we can add module auth and keep all of such functions. I made PR to delete it and this will solve last 2 errors with linting the code with ESLint
Good idea.
While it's cool to have a function that uniformally verify password in DB, but this one is never used and contains linting errors. Unused function verifyPassword()