Fix mock content fallback to preserve original HTML content
- Remove [Mock: id] placeholder text generation - Return nil for missing content to preserve original HTML - Maintain data attributes for editor functionality - Clean development experience with realistic content mixing
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package content
|
package content
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -104,16 +103,8 @@ func (m *MockClient) GetContent(siteID, contentID string) (*ContentItem, error)
|
|||||||
return &item, nil
|
return &item, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return fallback content for missing items during development
|
// Return nil for missing content - this will preserve original HTML content
|
||||||
fallback := &ContentItem{
|
return nil, nil
|
||||||
ID: contentID,
|
|
||||||
SiteID: siteID,
|
|
||||||
Value: fmt.Sprintf("[Mock: %s]", contentID),
|
|
||||||
Type: "text",
|
|
||||||
UpdatedAt: time.Now().Format(time.RFC3339),
|
|
||||||
}
|
|
||||||
|
|
||||||
return fallback, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetBulkContent fetches multiple content items by IDs
|
// GetBulkContent fetches multiple content items by IDs
|
||||||
|
|||||||
Reference in New Issue
Block a user