def get(self, tag_uuid): user = User({"tag_uuid": tag_uuid}) user.init_from_mongo() if user.user_uuid is not None: # resp = { # "user_uuid": user.user_id, # "secondary_id": user.second_id, # "first_name": user.first_name, # "last_name": user.last_name, # "mm_username": user.mm_username, # "project": user.project, # } # if user.user_uuid is not None: return user.__dict__ else: return {"error": "user not found"}, 409
def post(self): # Only user_id and in_lab is needed here. user = User(request.json) user.checkin(request.json["lab_uuid"]) return {"status": "success"}
def post(self): user = User(request.json) mongo_functions.change_mm_username(user)
def post(self): user = User(request.json) mongo_functions.remove_tag(user)
def post(self): user = User(request.json) mongo_functions.make_alumni(user)
def post(self): user = User(request.json) mongo_functions.make_administrator(user)
def put(self): user_dict = request.json user = User(user_dict) return mongo_functions.add_user(user)
def post(self): user = User(request.json) return {"status": user.authenticate()}
def post(self): user = User(request.json) user.checkout() return {"status": "success"}