Exemple #1
0
    $apiKey = array();
    $dataJSON = array();
    $headers = $app->request->headers->all();
    verifyHeaders(array('Key'));
    // $phone = $headers["Email"] ;
    // reading request params
    $apiKey = $headers['Key'];
    // echo json_encode($headers);
    $request['apiKey'] = $apiKey;
    // $request['email'] = $phone ;
    $request['restaurantID'] = $id;
    $request['customerID'] = $id2;
    $controller = new CustomerController();
    // Call controller function
    //echo json_encode($request) ;
    $response = $controller->resetCustomerPh($request);
    // echo json response
    echoRespnse(200, $response);
});
// DELETE EMAIL OF A CUSTOMER
$app->delete('/merchant/:id/customeremail/:id2', function ($id, $id2) use($app) {
    // check for required params
    $request = array();
    $response = array();
    $apiKey = array();
    $dataJSON = array();
    $headers = $app->request->headers->all();
    verifyHeaders(array('Key'));
    // $phone = $headers["Email"] ;
    // reading request params
    $apiKey = $headers['Key'];