pass encrypted field in server sside copy

This commit is contained in:
divyam234 2023-12-18 13:25:24 +05:30
parent 72a4ceecd0
commit 370d55508e

View file

@ -404,6 +404,7 @@ func (fs *FileService) CopyFile(c *gin.Context) (*schemas.FileOut, *types.AppErr
dbFile.Status = "active" dbFile.Status = "active"
dbFile.ParentID = dest.ID dbFile.ParentID = dest.ID
dbFile.ChannelID = &file.ChannelID dbFile.ChannelID = &file.ChannelID
dbFile.Encrypted = file.Encrypted
if err := fs.Db.Create(&dbFile).Error; err != nil { if err := fs.Db.Create(&dbFile).Error; err != nil {
return nil, fs.logAndReturn(copyFileContext, err, http.StatusInternalServerError) return nil, fs.logAndReturn(copyFileContext, err, http.StatusInternalServerError)