create and delete notification for a project working

This commit is contained in:
isUnknown 2025-01-10 15:38:57 +01:00
parent 8c6e21c707
commit 9222069ef5
9 changed files with 105 additions and 52 deletions

View file

@ -50,9 +50,9 @@ return [
echo json_encode(getFileData($newFile));
try {
$user->sendNotification($project, $commentData);
$project->createNotification($commentData);
} catch (\Throwable $th) {
throw new Exception($th->getMessage(), 1);
throw new Exception($th->getMessage() . ". Line " . $th->getLine() . " in file " . $th->getFile(), 1);
}
exit;

View file

@ -39,8 +39,8 @@ return [
echo json_encode(getFileData($newFile));
kirby()->user()->deleteNotification($project, $data->id);
$project->deleteNotification($data->id);
exit;
}
];