Removing string json's parameter from Runtime variable inside Movie's struct. Creating errors.go handling different json's error for our API.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s

This commit is contained in:
Maxime Delporte
2025-10-21 18:55:45 +02:00
parent bc21c4cf87
commit 0f7515e198
2 changed files with 49 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ type Movie struct {
/*
Use the Runtime type instead of int32. Note that the omitempty directive will still work on this: if the Runtime field has the underlying value 0, then it will be considered empty and omitted -- and the MarshalJSON() method we just made won't be called at all.
*/
Runtime Runtime `json:"runtime,omitempty,string"`
Runtime Runtime `json:"runtime,omitempty"`
Genres []string `json:"genres,omitempty"`
Version int32 `json:"version"`
}