from flask import request,jsonify class User: def __init__(self, action, data,logger): self.action = action self.data = data self.logger = logger def user_router(self): if self.action == "register": return self.register() elif self.action == "login": return self.login() def register(self): print("---register---") return "register" def login(self): print("---login----") self.logger.log("😂") return self.data