change action
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Roy Olav Purser 2022-02-12 12:48:41 +01:00
parent 6cf319940f
commit f9964a8157
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -48,12 +48,12 @@ class ProxyCreateLink(pydantic.BaseModel):
class ProxyRequest(pydantic.BaseModel):
action: Literal["create-url", "read-config"]
action: Literal["create-urls", "read-config"]
urls: Optional[list[ProxyCreateLink]]
class ProxyResponse(pydantic.BaseModel):
action: Literal["create-url", "read-config"]
action: Literal["create-urls", "read-config"]
urls: Optional[list[pydantic.HttpUrl]]
@ -86,7 +86,7 @@ class ProxyElem:
response_data: ProxyResponse
try:
request_data = ProxyRequest.parse_obj({"urls": link_requests, "action": "create-url"})
request_data = ProxyRequest.parse_obj({"urls": link_requests, "action": "create-urls"})
except pydantic.ValidationError as e:
logger.info(e)
return clean_urls