#!/bin/bash

# Validate arguments
if [[ -z "$1" ]]; then
    echo "First argument should be the RECO_TYPE (logo/med). Exiting..."
    exit 1
fi

if [[ -z "$2" ]]; then
    echo "Second argument should be the USER_ID. Exiting..."
    exit 1
fi

RECO_TYPE_CLOUD="reco-${1}"
USER_ID=$2

# Run face delete command through CLI
docker exec ${RECO_TYPE_CLOUD}-php1 bash -c "cd /var/www/html/recomedcloud && php index.php candidate/face/cli_delete_user_faces/$USER_ID"

# Print status
echo "User faces deletion for user ID $USER_ID completed."