fixed delete note
This commit is contained in:
@@ -88,8 +88,12 @@ class NotesController
|
||||
|
||||
public function deleteNote()
|
||||
{
|
||||
$noteId = $_GET['id'];
|
||||
$this->notesModel->deleteNote($noteId, $_SESSION['user_id']);
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['note_id'])) {
|
||||
$noteId = $_POST['note_id'];
|
||||
$this->notesModel->deleteNote($noteId, $_SESSION['user_id']);
|
||||
}
|
||||
|
||||
header("Location: ?controller=Notes&page=showNotes&do=showNotes");
|
||||
exit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user