mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
[server] Remove objectNonce from video preview
This commit is contained in:
parent
56b8728e79
commit
1bf8f2749e
@ -95,9 +95,11 @@ type Row struct {
|
|||||||
UserID int64
|
UserID int64
|
||||||
Type ente.ObjectType
|
Type ente.ObjectType
|
||||||
// If a file type has multiple objects, then the size is the sum of all the objects.
|
// If a file type has multiple objects, then the size is the sum of all the objects.
|
||||||
Size int64
|
Size int64
|
||||||
LatestBucket string
|
LatestBucket string
|
||||||
ObjectID *string
|
ObjectID *string
|
||||||
|
// For HLS video object, there's no object nonce, all relevant data
|
||||||
|
// is stored in the metadata object that primarily contains the playlist.
|
||||||
ObjectNonce *string
|
ObjectNonce *string
|
||||||
ReplicatedBuckets []string
|
ReplicatedBuckets []string
|
||||||
DeleteFromBuckets []string
|
DeleteFromBuckets []string
|
||||||
|
@ -16,8 +16,5 @@ func (r VidPreviewRequest) Validate() error {
|
|||||||
if r.Playlist == "" || r.PlayListNonce == "" {
|
if r.Playlist == "" || r.PlayListNonce == "" {
|
||||||
return ente.NewBadRequestWithMessage("playlist and playListNonce are required for preview video")
|
return ente.NewBadRequestWithMessage("playlist and playListNonce are required for preview video")
|
||||||
}
|
}
|
||||||
if r.ObjectNonce == "" {
|
|
||||||
return ente.NewBadRequestWithMessage("objectNonce is required for preview video")
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ func (c *Controller) InsertVideoPreview(ctx *gin.Context, req *filedata.VidPrevi
|
|||||||
Size: size + req.ObjectSize,
|
Size: size + req.ObjectSize,
|
||||||
LatestBucket: bucketID,
|
LatestBucket: bucketID,
|
||||||
ObjectID: &req.ObjectID,
|
ObjectID: &req.ObjectID,
|
||||||
ObjectNonce: &req.ObjectNonce,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dbInsertErr := c.Repo.InsertOrUpdatePreviewData(context.Background(), row)
|
dbInsertErr := c.Repo.InsertOrUpdatePreviewData(context.Background(), row)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user