Beispiel #1
0
def face_refresh(user):
    face_id = request.form.get('face_id')
    if not face_id:
        return error_response("No `face_id`.")

    response = do_face_refresh(face_id, user)

    return success_response(response)
Beispiel #2
0
def face_refresh(user):
    face_id = request.form.get('face_id')
    if not face_id:
        return error_response("No `face_id`.")

    response = do_face_refresh(face_id, user)

    return success_response(response)
Beispiel #3
0
def tag_face(user):
    face_id = request.form.get('face_id', None)
    tag_id = request.form.get('tag_id', None)
    if not face_id or not tag_id:
        return error_response("Missing `tag_id` or `face_id")

    add_tag_to_face(face_id, tag_id, user)

    return success_response(do_face_refresh(face_id, user))
Beispiel #4
0
def add_face_to_favorite(user):
    face_id = request.form.get('face_id', None)
    if not face_id:
        return error_response("No face_id to fav.")
    create_favorite_for(user, face_id)
    return success_response(do_face_refresh(face_id, user))