mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-07-25 21:00:48 +02:00
Upgrade LBCAlerte to version 3.3
Add upgrade script
This commit is contained in:
16
sources/app/api/annonce/delete.php
Normal file
16
sources/app/api/annonce/delete.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?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);
|
||||
}
|
Reference in New Issue
Block a user