fix: sender

This commit is contained in:
Cory Dransfeldt 2024-10-08 17:49:08 -07:00
parent e0593447eb
commit 23602a7ce0
No known key found for this signature in database
3 changed files with 4 additions and 5 deletions

View file

@ -61,7 +61,7 @@ const fetchAllPosts = async () => {
let posts = []
let page = 0
let fetchMore = true
const uniqueSlugs = new Set()
const uniquePosts = new Set()
while (fetchMore) {
const { data, error } = await supabase
@ -78,9 +78,9 @@ const fetchAllPosts = async () => {
if (data.length < PAGE_SIZE) fetchMore = false
for (const post of data) {
if (uniqueSlugs.has(post['slug'])) continue
if (uniquePosts.has(post['url'])) continue
uniqueSlugs.add(post['slug'])
uniquePosts.add(post['url'])
posts.push(post)
}

View file

@ -4,7 +4,6 @@ layout: default
pagination:
data: posts
size: 8
alias: posts
permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
---
{% for post in pagination.items %}

View file

@ -16,7 +16,7 @@ const sanitizeMediaString = (str) => {
const sendEmail = async (subject, text, authHeader, maxRetries = 3) => {
const emailData = new URLSearchParams({
from: '<coryd.dev> hi@admin.coryd.dev',
from: 'coryd.dev <hi@admin.coryd.dev>',
to: 'hi@coryd.dev',
subject: subject,
text: text,