Fix historico so it uses an object as parameter
This commit is contained in:
parent
161cb598c4
commit
10e804babc
@ -7,9 +7,9 @@ docker run --rm --privileged \
|
|||||||
--reset -p yes
|
--reset -p yes
|
||||||
|
|
||||||
# Build and deploy
|
# Build and deploy
|
||||||
if [ ! -d templates]
|
if [ ! -d template ]
|
||||||
then
|
then
|
||||||
faas-cli template store pull python3-http
|
faas-cli template store pull python3-flask
|
||||||
fi
|
fi
|
||||||
faas-cli publish -f nombres.yml --platforms linux/arm64 --build-arg 'TEST_ENABLED=false'
|
faas-cli publish -f nombres.yml --platforms linux/arm64 --build-arg 'TEST_ENABLED=false'
|
||||||
faas-cli deploy -f nombres.yml
|
faas-cli deploy -f nombres.yml
|
||||||
|
@ -26,12 +26,13 @@ def handle(req):
|
|||||||
Args:
|
Args:
|
||||||
req (str): request body
|
req (str): request body
|
||||||
|
|
||||||
[nombre1, nombre2, ... nombreN]
|
{"i": ["nombre1, nombre2"]}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
nombres = []
|
nombres = []
|
||||||
try:
|
try:
|
||||||
nombres = loads(req)
|
nombres = loads(req)
|
||||||
|
nombres = nombres["i"].split(",")
|
||||||
nombres = [remove_accents(x.strip().lower()) for x in nombres]
|
nombres = [remove_accents(x.strip().lower()) for x in nombres]
|
||||||
nombres = [n for n in nombres if n]
|
nombres = [n for n in nombres if n]
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user