mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-06-07 21:15:29 +02:00
17 lines
331 B
PHP
17 lines
331 B
PHP
<?php
|
|
if (empty($_POST["id"])) {
|
|
return array(
|
|
"data" => $_POST,
|
|
"errors" => array(
|
|
"id" => "Un ID doit être fourni"
|
|
)
|
|
);
|
|
}
|
|
|
|
$ad = $storage->fetchById($_POST["id"]);
|
|
if ($ad) {
|
|
$storage->delete($ad);
|
|
$adPhoto = new App\Storage\AdPhoto($userAuthed);
|
|
$adPhoto->delete($ad);
|
|
}
|