Use github.com/julienschmidt/httprouter instead of gorilla
This commit is contained in:
parent
5a0b81ba32
commit
3b320469b5
13 changed files with 223 additions and 169 deletions
|
|
@ -8,7 +8,7 @@ CLOUDPASS=fic:'f>t\nV33R|(+?$i*'
|
|||
new_theme() {
|
||||
NAME=`echo $1 | sed 's/"/\\\\"/g'`
|
||||
AUTHORS=`echo $2 | sed 's/"/\\\\"/g'`
|
||||
curl -f -s -d "{\"name\": \"$NAME\", \"authors\": \"$AUTHORS\"}" "${BASEURL}/api/themes/" |
|
||||
curl -f -s -d "{\"name\": \"$NAME\", \"authors\": \"$AUTHORS\"}" "${BASEURL}/api/themes" |
|
||||
grep -Eo '"id":[0-9]+,' | grep -Eo "[0-9]+"
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ new_exercice() {
|
|||
GAIN="$5"
|
||||
VIDEO="$6"
|
||||
|
||||
curl -f -s -d "{\"title\": \"$TITLE\", \"statement\": \"$STATEMENT\", \"depend\": $DEPEND, \"gain\": $GAIN, \"videoURI\": \"$VIDEO\"}" "${BASEURL}/api/themes/$THEME/exercices/" |
|
||||
curl -f -s -d "{\"title\": \"$TITLE\", \"statement\": \"$STATEMENT\", \"depend\": $DEPEND, \"gain\": $GAIN, \"videoURI\": \"$VIDEO\"}" "${BASEURL}/api/themes/$THEME/exercices" |
|
||||
grep -Eo '"id":[0-9]+,' | grep -Eo "[0-9]+"
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue