Skip to content

Commit

Permalink
test: Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed Jan 16, 2025
1 parent 53a7b2c commit a4bc9d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions cmd/api/get-entry-by-fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func GetEntryByFields(where []db_structs.QueryWhere) (structs.Route, error) {
&result.Slug,
&result.Url,
&result.Parent,
&result.Version,
&result.UpdatedAt,
&result.ExcludeSitemap,
&result.Published,
Expand Down
24 changes: 12 additions & 12 deletions cmd/cs_sdk/functions/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@ func addAllAssets(data map[string]interface{}) error {
filesize := getFilesize(assetData)

err := assets.SetAsset(structs.Asset{
Uid: assetData["uid"].(string),
Title: getTitle(assetData),
ContentType: assetData["content_type"].(string),
Locale: publishDetails["locale"].(string),
Url: assetData["url"].(string),
Parent: parentUid,
Version: getVersion(assetData),
Filesize: filesize,
Height: assetHeight,
Width: assetWidth,
UpdatedAt: getUpdatedAt(assetData),
Published: item["type"].(string) == "asset_published",
Uid: assetData["uid"].(string),
Title: getTitle(assetData),
// ContentType: assetData["content_type"].(string),
Locale: publishDetails["locale"].(string),
Url: getSlug(assetData),
Parent: parentUid,
Version: getVersion(assetData),
Filesize: filesize,
Height: assetHeight,
Width: assetWidth,
UpdatedAt: getUpdatedAt(assetData),
Published: item["type"].(string) == "asset_published",
})

if err != nil {
Expand Down

0 comments on commit a4bc9d5

Please sign in to comment.