From a9834a81d3e5a4b65216c156cc49bcfa294bff51 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 18 Jan 2024 12:15:47 -0500 Subject: [PATCH] fix: add json tags --- metadata/web_app.go | 10 +++++----- metadata/web_app_reference.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/metadata/web_app.go b/metadata/web_app.go index a8865fb..80e6c3a 100644 --- a/metadata/web_app.go +++ b/metadata/web_app.go @@ -17,11 +17,11 @@ var ( type WebAppMetadata struct { BaseMetadata - Name string - TryFiles []string - ErrorPages map[int]string - ExtraMetadata ExtraMetadata - Paths map[string]WebAppMetadataFileReference + Name string `json:"name"` + TryFiles []string `json:"tryFiles"` + ErrorPages map[int]string `json:"errorPages"` + ExtraMetadata ExtraMetadata `json:"extraMetadata"` + Paths map[string]WebAppMetadataFileReference `json:"paths"` } func NewWebAppMetadata(name string, tryFiles []string, extraMetadata ExtraMetadata, errorPages map[int]string, paths map[string]WebAppMetadataFileReference) *WebAppMetadata { diff --git a/metadata/web_app_reference.go b/metadata/web_app_reference.go index 76c2832..6126c15 100644 --- a/metadata/web_app_reference.go +++ b/metadata/web_app_reference.go @@ -3,8 +3,8 @@ package metadata import "git.lumeweb.com/LumeWeb/libs5-go/encoding" type WebAppMetadataFileReference struct { - ContentType string - Cid *encoding.CID + ContentType string `json:"contentType"` + Cid *encoding.CID `json:"cid"` } func NewWebAppMetadataFileReference(cid *encoding.CID, contentType string) *WebAppMetadataFileReference {