Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## ![Python](/app/static/repoicon.png) Python

> Python with FastAPI using Postgres & tsvector.
> With FastAPI using Postgres & tsvector.

Open Source, production ready Python FastAPI/Postgres app.

Open Source, production ready Python FastAPI/Postgres app.
[GitHub](https://github.com/goldlabelapps/python) |
[onrender](https://nx-ai.onrender.com) |
[onr]Render](https://nx-ai.onrender.com) |
[by Goldlabel](https://goldlabel.pro)

- **Python 3.11+**
Expand Down
7 changes: 2 additions & 5 deletions app/api/resend/resend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from app.utils.make_meta import make_meta
from fastapi import APIRouter, Query, Path, Body, HTTPException
from app.utils.db import get_db_connection
from .utils.send_email import send_email_resend
from app.utils.send_email import send_email_resend

router = APIRouter()
base_url = os.getenv("BASE_URL", "http://localhost:8000")
Expand All @@ -18,10 +18,7 @@ def root() -> dict:
meta = make_meta("error", "RESEND_API_KEY is missing from environment. Please set it in your .env file.")
return {"meta": meta}
meta = make_meta("success", "Resend endpoint")
data = [
{"action": "send email"},
]
return {"meta": meta, "data": data}
return {"meta": meta}


# POST endpoint to send email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import httpx
import os

RESEND_API_KEY = os.getenv("RESEND_API_KEY")
RESEND_API_URL = "https://api.resend.com/emails"

def send_email_resend(to: str, subject: str, html: str, sender: str) -> dict:
resend_api_key = os.getenv("RESEND_API_KEY")
if not resend_api_key:
if not RESEND_API_KEY:
return {"error": "Missing RESEND_API_KEY"}
headers = {
"Authorization": f"Bearer {resend_api_key}",
"Authorization": f"Bearer {RESEND_API_KEY}",
"Content-Type": "application/json"
}
payload = {
Expand Down
Loading