put with readonly uses put value

master
Bel LaPointe 2022-02-17 12:15:21 -07:00
parent aa8ca4d967
commit a5fff37ba0
3 changed files with 6 additions and 0 deletions

View File

@ -148,6 +148,10 @@ crawl_with() {
echo "$sum"
)"
ID="${ID%/}"
if [ "${#expanded[@]}" == 1 ]; then
ID="$pid"
CONTENT="$(printf "%s\n\n%s", "$crawlable_source" "$CONTENT")"
fi
log " $ID ($TITLE): ${#CONTENT}"
push_crawled "$ID" "$TITLE" "$CONTENT"
log " /$ID ($TITLE): ${#CONTENT}"

View File

@ -106,6 +106,7 @@ notes() (
_nncurl \
-X PUT \
-H "Title: $title" \
-H "Read-Only: true" \
-d "$body" \
$NOTES_ADDR/api/v0/files/$id >&2
}

View File

@ -62,6 +62,7 @@ func (base Leaf) Merge(updated Leaf) Leaf {
base.Meta.Title = "Untitled"
}
base.Meta.Deleted = updated.Meta.Deleted
base.Meta.ReadOnly = updated.Meta.ReadOnly
base.Content = updated.Content
return base
}