This commit is contained in:
parent
6cf319940f
commit
f9964a8157
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user