GithubHelp home page GithubHelp logo

bs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bs's Issues

Extra / in CURL when deploying options

Similar Issue to dvankevich - all the options are getting filtered with a / before the option is set.

Line 528:

"$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"

should be:

"$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+}$id${target:+/}$target"

Once corrected, I'm able to properly set options like count and offset.

Filter adding = before $OPTARG

Found that the filter isn't working properly as stated in the API documentation. It's currently adding an = after ?Filter which is not the correct filter format.

Line 269:

query="${query:-?}${query:+&}filter=$OPTARG"

Should be:

query="${query:-?}${query:+&}filter$OPTARG"

On a secondary Note - the filter includes brackets in the API which are not allowed in the URL. Would be nice if I could just pass the brackets to BS and let it fix it when generating the URL. For now, I'll write the %5B and %5D into my own code.

extra character "/" in url for docs|search|recycle-bin api endpoints

My BookStack version v22.11.1

when i run command
./bs_orig search -q time

i got 301 Moved Permanently html response

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://192.168.56.142/api/search?query=time">here</a>.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at 192.168.56.142 Port 80</address>
</body></html>

the reason is an extra character / in the url

must be http://192.168.56.142/api/search?query=time and there are http://192.168.56.142/api/search/?query=time

my little fix solves this problem

diff bs_orig bs
527,528c527,534
< 
<     "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"
---
>     case $endpoint in
>         docs|search|recycle-bin)
>             "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint$id${target:+/}$target"
>             ;;
>         *)
>             "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"
>             ;;
>     esac

`curl: option --json: is unknown` when attempting to create users

I'm running bs and am able to query books, users, etc., but when I attempt to create a user (including using the example command in the readme) I get the following error:

me$ ./bs users create -n "Billy Bob" -e "[email protected]" -L "Klingon" -p "b1llyb0b123"
curl: option --json: is unknown
curl: try 'curl --help' or 'curl --manual' for more information

I'm running Ubuntu 22.04 and BookStack 22.11.1, connecting remotely.

Any pointers would be welcome -- I'll be migrating from another wiki soon and I think the tool will be invaluable!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.