Refactor
This commit is contained in:
parent
f64100226d
commit
1a51b98700
7 changed files with 41 additions and 23 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import config from '../../../config';
|
||||
import { IDriveFile } from '../../../models/drive-file';
|
||||
import getDriveFileUrl from '../../../misc/get-drive-file-url';
|
||||
|
||||
export default (file: IDriveFile) => ({
|
||||
type: 'Document',
|
||||
mediaType: file.contentType,
|
||||
url: file.metadata.url || `${config.drive_url}/${file._id}`
|
||||
url: getDriveFileUrl(file)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue