fix: player issues
This commit is contained in:
@@ -165,7 +165,7 @@ func (ctl *posts) Play(ctx fiber.Ctx, id int64, user *model.Users) (*PlayUrl, er
|
||||
}
|
||||
|
||||
for _, asset := range post.Assets.Data {
|
||||
if asset.Type == "video/mp4" && asset.Metas.Short == preview {
|
||||
if asset.Type == "video/mp4" && asset.Metas != nil && asset.Metas.Short == preview {
|
||||
media, err := models.Medias.GetByID(ctx.Context(), asset.Media)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user