File tree 1 file changed +5
-5
lines changed
internal/http/server/handlers/v1
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ func StoriesIndex(ctr *container.Container) echo.HandlerFunc {
22
22
}
23
23
24
24
type StoriesStoreRequest struct {
25
- Caption string `json:"caption" validate:"required"`
26
- AudioID uint64 `json:"audio_id" validate:"required"`
27
- ImageID uint64 `json:"image_id" validate:"required "`
25
+ Caption string `json:"caption" validate:"required"`
26
+ AudioID uint64 `json:"audio_id" validate:"required"`
27
+ ImageID * uint64 `json:"image_id"`
28
28
}
29
29
30
30
func StoriesStore (ctr * container.Container ) echo.HandlerFunc {
@@ -68,8 +68,8 @@ func StoriesStore(ctr *container.Container) echo.HandlerFunc {
68
68
}
69
69
70
70
var imageId * uint64
71
- if r .ImageID != 0 {
72
- image , err := ctr .FileService .FindByID (r .ImageID )
71
+ if r .ImageID != nil {
72
+ image , err := ctr .FileService .FindByID (* r .ImageID )
73
73
if err != nil {
74
74
return err
75
75
}
You can’t perform that action at this time.
0 commit comments