function createNote($id) { if (!($user = User::lookup($id))) { Http::response(404, 'Unknown customer'); } require_once INCLUDE_DIR . 'ajax.note.php'; $ajax = new NoteAjaxAPI(); return $ajax->createNote('U' . $id); }
function createNote($id) { if (!($org = Organization::lookup($id))) { Http::response(404, 'Unknown organization'); } require_once INCLUDE_DIR . 'ajax.note.php'; $ajax = new NoteAjaxAPI(); return $ajax->createNote('O' . $id); }