feat: public API, SEO and existing surfaces

This commit is contained in:
Florian Sylvain committed 2026-11-03 03:58:10 +01:00
1 parent 45fbbc33b1
commit c390fcfe8d
103 files changed
+4476 -231

No files matched your search

+3 -3
View File
@@ -183,8 +183,8 @@ func TestSeoDataMediaUsage(t *testing.T) {
rec := e.as(t, apiKeyDevId, http.MethodGet, "/v1/media/5/usage", "")
want := `[{"type": "article", "id": 3, "title": "Body article", "published": true, "fields": ["body"]},
{"type": "article", "id": 8, "title": "Cover article", "published": false, "fields": ["cover"]},
want := `[{"type": "article", "id": 3, "title": "Body article", "published": true, "fields": ["body"], "story_id": 3, "lang": ""},
{"type": "article", "id": 8, "title": "Cover article", "published": false, "fields": ["cover"], "story_id": 8, "lang": ""},
{"type": "author", "id": 2, "title": "Camille", "fields": ["avatar"]},
{"type": "site", "id": 1, "title": "Main", "fields": ["default_social_image"]}]`
if rec.Code != http.StatusOK {
@@ -204,7 +204,7 @@ func TestSeoDataMediaUsage(t *testing.T) {
for key := range items[0] {
keys = append(keys, key)
}
if len(items) != 1 || items[0]["id"] != float64(3) || items[0]["title"] != "Body article" || items[0]["published"] != true || len(keys) != 5 {
if len(items) != 1 || items[0]["id"] != float64(3) || items[0]["title"] != "Body article" || items[0]["published"] != true || len(keys) != 7 {
t.Errorf("item = %v", items)
}
})