[admin] Add new routes to manage hints, files and keys
This commit is contained in:
parent
875cb11747
commit
c64f1969d9
7 changed files with 259 additions and 43 deletions
|
|
@ -60,10 +60,10 @@ new_hint() {
|
|||
new_key() {
|
||||
THEME="$1"
|
||||
EXERCICE="$2"
|
||||
NAME="$3"
|
||||
TYPE="$3"
|
||||
KEY=`echo $4 | sed 's/"/\\\\"/g' | sed 's#\\\\#\\\\\\\\#g'`
|
||||
|
||||
curl -f -s -d "{\"name\": \"$NAME\", \"key\": \"$KEY\"}" "${BASEURL}/api/themes/$THEME/exercices/$EXERCICE/keys" |
|
||||
curl -f -s -d "{\"type\": \"$TYPE\", \"key\": \"$KEY\"}" "${BASEURL}/api/themes/$THEME/exercices/$EXERCICE/keys" |
|
||||
grep -Eo '"id":[0-9]+,' | grep -Eo "[0-9]+"
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue