diff --git a/modules/api_client.py b/modules/api_client.py index 22c772b..cb7e750 100644 --- a/modules/api_client.py +++ b/modules/api_client.py @@ -96,7 +96,7 @@ async def random_pic(token: Union[str, None] = None) -> Tuple[str, str]: async def upload_pic( filepath: str, allow_duplicates: bool = False, token: Union[str, None] = None -) -> Tuple[bool, list]: +) -> Tuple[bool, list, str]: token = await authorize() if token is None else token try: pic_name = path.basename(filepath) @@ -135,10 +135,10 @@ async def upload_pic( duplicates.append( f'`{duplicate["id"]}`:\n{configGet("address_external", "posting", "api")}/token/photo/{(await response.json())["access_token"]}?id={index}' ) - return True, duplicates + return True, duplicates, (await response.json())["id"] except Exception as exp: print_exc() - return False, [] + return False, [], "" async def find_pic(