Changeset 0.17.1 (#76)

This commit is contained in:
2026-02-28 01:40:31 +00:00
parent c9141a6896
commit 856dc9b0ac
64 changed files with 8037 additions and 1657 deletions

View File

@@ -162,7 +162,7 @@ func (h *AttachmentHandler) Upload(c *gin.Context) {
// Update storage_key in PG
database.DB.ExecContext(c.Request.Context(),
`UPDATE attachments SET storage_key = $1 WHERE id = $2`,
database.Q(`UPDATE attachments SET storage_key = $1 WHERE id = $2`),
att.StorageKey, att.ID)
// For images, mark extraction as not needed (complete immediately)
@@ -421,7 +421,7 @@ func (h *AttachmentHandler) CleanupChannelStorage(channelID string) {
func (h *AttachmentHandler) verifyChannelAccess(c *gin.Context, channelID, userID string) bool {
var ownerID string
err := database.DB.QueryRowContext(c.Request.Context(),
`SELECT user_id FROM channels WHERE id = $1`, channelID).Scan(&ownerID)
database.Q(`SELECT user_id FROM channels WHERE id = $1`), channelID).Scan(&ownerID)
if err != nil {
c.JSON(http.StatusNotFound, gin.H{"error": "channel not found"})
return false