Skip to content

Commit

Permalink
🔸minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jiisanda committed Dec 31, 2023
1 parent 1877557 commit 9dbcca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions app/api/routes/documents/document_sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ async def share_link_document(
):

"""
Shares a document link with another user, sends a mail and notifies the receiver.
Shares a document link with another user, sends mail and notifies the receiver.
Args:
document (Union[str, UUID]): The ID or name of the document to be shared.
share_request (SharingRequest): The sharing request containing the details of the sharing operation.
repository (DocumentSharingRepository): The repository for managing document sharing.
auth_repository (AuthRepository): The repository for managing User related queries.
auth_repository (AuthRepository): The repository for managing User-related queries.
metadata_repository (DocumentMetadataRepository): The repository for managing document metadata.
notify_repository (NotifyRepo): The repository for managing notification
user (TokenData): The token data of the authenticated user.
Expand Down Expand Up @@ -159,7 +159,6 @@ async def share_document(
key = await get_key(s3_url=get_document_metadata["s3_url"])

file = await document_repo.get_s3_file_object_body(key=key)
print("Here here")

return await repository.share_document(
filename=get_document_metadata["name"],
Expand Down
2 changes: 0 additions & 2 deletions app/db/repositories/documents/document_sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ async def share_document(
temp_path = temp.name

subject = f"{owner.username} shared a file with you using DocFlow"
print(temp_path)
for mails in share_to:
content = f"""
Hello {mails}!
Expand All @@ -229,7 +228,6 @@ async def share_document(
Regards,
DocFlow
"""
print(f"mail to {mails}")
mail_service(mail_to=mails, subject=subject, content=content, file_path=temp_path)

if notify:
Expand Down

0 comments on commit 9dbcca1

Please sign in to comment.