def login(self, username_or_email, password):
     code = AdminModel.login(self._database, username_or_email, password)
     if code == 4:
         return getMessage(code).format(EMAIL=username_or_email)
     elif code == 5:
         return getMessage(code).format(USERNAME=username_or_email)
     return getMessage(code)
 def register(self, username, password, first_name, last_name, email,
              phone_number):
     code = AdminModel.register(self._database, username, password,
                                first_name, last_name, email, phone_number)
     if code == 1:
         return getMessage(code).format(USERNAME=username)
     elif code == 2:
         return getMessage(code).format(EMAIL=email)
     return getMessage(code)
 def change_profile_picture(self, username, new_pic_id):
     code = AdminModel.change_profile_picture(self._database, username,
                                              new_pic_id)
     return getMessage(code)
 def change_phone_number(self, username, new_phone_number):
     code = AdminModel.change_phone_number(self._database, username,
                                           new_phone_number)
     return getMessage(code)
 def change_password(self, username, new_password):
     code = AdminModel.change_password(self._database, username,
                                       new_password)
     return getMessage(code)
 def change_last_name(self, username, new_name):
     code = AdminModel.change_last_last_name(self._database, username,
                                             new_name)
     return getMessage(code)
 def change_email(self, username, new_email):
     code = AdminModel.change_email(self._database, username, new_email)
     return getMessage(code)