API : getipns & getg1pub

This commit is contained in:
fred 2023-03-14 17:10:20 +01:00
parent f9bffdd305
commit 0485eb431f
1 changed files with 10 additions and 1 deletions

View File

@ -413,13 +413,22 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
# GETIPNS # GETIPNS
############################################## ##############################################
if [[ $APPNAME == "getipns" ]]; then if [[ $APPNAME == "getipns" ]]; then
echo "$HTTPCORS /ipns/${ASTRONAUTENS}"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & echo "$HTTPCORS url=/ipns/${ASTRONAUTENS}"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
end=`date +%s` end=`date +%s`
echo $APPNAME "(☉_☉ ) /ipns/${ASTRONAUTENS} Execution time was "`expr $end - $start` seconds. echo $APPNAME "(☉_☉ ) /ipns/${ASTRONAUTENS} Execution time was "`expr $end - $start` seconds.
exit 0 exit 0
fi fi
############################################## ##############################################
# GETG1PUB
##############################################
if [[ $APPNAME == "getg1pub" ]]; then
echo "$HTTPCORS url=/user/${G1PUB}"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
end=`date +%s`
echo $APPNAME "(☉_☉ ) /ipns/${ASTRONAUTENS} Execution time was "`expr $end - $start` seconds.
exit 0
fi
##############################################
# LOGIN # LOGIN
############################################## ##############################################
if [[ $APPNAME == "login" ]]; then if [[ $APPNAME == "login" ]]; then