Skip to content

Commit

Permalink
Removed Duplicates
Browse files Browse the repository at this point in the history
Updated error messages

Signed-off-by: Dark Decoy <darkdecoy@notracking.space>
  • Loading branch information
Dark Decoy committed Mar 10, 2023
1 parent 68a0d0f commit a6e6291
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions bin/hedgedoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,31 +187,13 @@ function info_note() {
local json="$2"

if [[ ! "$note_id" ]]; then
echo "Error: You must specify an export type and note id to export." >&2
echo "Error: You must specify a note id to retrieve metadata from the server." >&2
echo "" >&2
echo "Usage: $SCRIPTNAME info <note_id> [--json]" >&2
echo "For usage exmaples, see: $SCRIPTNAME help" >&2
return 2
fi

local json="$2"

if [[ ! "$note_id" ]]; then
echo "Error: You must specify an export type and note id to export." >&2
echo "" >&2
echo "Usage: $SCRIPTNAME info <note_id> [--json]" >&2
echo "For usage exmaples, see: $SCRIPTNAME help" >&2
return 2
fi

if [[ "$json" == "--json" ]]
then

curl \
--silent \
--cookie "$HEDGEDOC_COOKIES_FILE" \
"${HEDGEDOC_SERVER}/$note_id/info"

if [[ "$json" == "--json" ]]
then

Expand Down

0 comments on commit a6e6291

Please sign in to comment.