fix: add json tags

This commit is contained in:
Derrick Hammer 2024-01-18 12:15:47 -05:00
parent cf168f8e4d
commit a9834a81d3
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 7 additions and 7 deletions

View File

@ -17,11 +17,11 @@ var (
type WebAppMetadata struct { type WebAppMetadata struct {
BaseMetadata BaseMetadata
Name string Name string `json:"name"`
TryFiles []string TryFiles []string `json:"tryFiles"`
ErrorPages map[int]string ErrorPages map[int]string `json:"errorPages"`
ExtraMetadata ExtraMetadata ExtraMetadata ExtraMetadata `json:"extraMetadata"`
Paths map[string]WebAppMetadataFileReference Paths map[string]WebAppMetadataFileReference `json:"paths"`
} }
func NewWebAppMetadata(name string, tryFiles []string, extraMetadata ExtraMetadata, errorPages map[int]string, paths map[string]WebAppMetadataFileReference) *WebAppMetadata { func NewWebAppMetadata(name string, tryFiles []string, extraMetadata ExtraMetadata, errorPages map[int]string, paths map[string]WebAppMetadataFileReference) *WebAppMetadata {

View File

@ -3,8 +3,8 @@ package metadata
import "git.lumeweb.com/LumeWeb/libs5-go/encoding" import "git.lumeweb.com/LumeWeb/libs5-go/encoding"
type WebAppMetadataFileReference struct { type WebAppMetadataFileReference struct {
ContentType string ContentType string `json:"contentType"`
Cid *encoding.CID Cid *encoding.CID `json:"cid"`
} }
func NewWebAppMetadataFileReference(cid *encoding.CID, contentType string) *WebAppMetadataFileReference { func NewWebAppMetadataFileReference(cid *encoding.CID, contentType string) *WebAppMetadataFileReference {