has('notes', ['AND' => ['noteid' => $VARS['id'], 'ownerid' => getRequestUser()->getUID()]])) { sendJsonResp("No such note exists or you don't have permission to read it.", "ERROR"); } $note = Note::loadNote($VARS['id'])->toArray(); exitWithJson(["status" => "OK", "note" => $note]);