Fix dashboard failing to load episodes after RSS import
Build and Deploy / build-and-deploy (push) Successful in 52s

The root cause was that modernc.org/sqlite stores time.Time as strings
but cannot scan strings back into time.Time, causing ListEpisodes to
fail. Changed PublishedAt and CreatedAt in store structs from time.Time
to string, with format/parse handled at the application level.

Also fixed a secondary issue where the published_at format stored during
import had a duplicated timezone offset.
This commit is contained in:
2026-07-12 16:17:51 -04:00
parent b075433e6e
commit 9011a00475
5 changed files with 28 additions and 14 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ func (h *ImportHandler) importSelected(w http.ResponseWriter, r *http.Request, r
publishedAt = t
}
_, err = h.Store.CreateEpisode(userID, item.Title, item.Description, audioPath, imagePath, publishedAt)
_, err = h.Store.CreateEpisode(userID, item.Title, item.Description, audioPath, imagePath, publishedAt.Format("2006-01-02 15:04:05"))
if err != nil {
errors = append(errors, fmt.Sprintf("%s: database error: %v", item.Title, err))
h.removeFile(audioPath)