Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update list_email_content to DRF #35112

Closed
Tracked by #35057
awais786 opened this issue Jul 11, 2024 · 0 comments
Closed
Tracked by #35057

update list_email_content to DRF #35112

awais786 opened this issue Jul 11, 2024 · 0 comments
Assignees

Comments

@awais786
Copy link
Contributor

awais786 commented Jul 11, 2024

Issue: #35112

existing API Code

Updating api code using DRF.

  1. Added standard authentication_classes
  2. Added permission_classes

Steps to verify on local tutor instance:
1: Open admin panel and laod this page and enable both checkboxes and save.
2: Open this page and enter course id and enabled email.
3. Open instructor dashboard.
4. email tab is visible and click on that and further click new experience.
5. Send an email email now.
6. Click on Email Task History now it will hit the related API.

Steps to verify via postman.

  1. Pass the URL in postman.
  2. Pass required csrf token and access token.

expected result

{
    "emails": [
        {
            "created": "2024-07-31T07:20:30.293Z",
            "sent_to": [
                "Myself"
            ],
            "requester": "admin",
            "email": {
                "subject": "awa",
                "html_message": "<p>aaaa</p>",
                "id": "2"
            },
            "number_sent": "1 sent"
        },
        {
            "created": "2024-07-31T07:17:50.419Z",
            "sent_to": [
                "Myself",
                "All students"
            ],
            "requester": "admin",
            "email": {
                "subject": "awais",
                "html_message": "<p>THis is not a <strong>ways</strong></p>",
                "id": "1"
            },
            "number_sent": "2 sent"
        }
    ]
}
@awais786 awais786 self-assigned this Jul 11, 2024
@awais786 awais786 changed the title List_email_content update list_email_content to DRF Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant