hudozka api file/image dto added filepath

This commit is contained in:
tmshv committed 2021-01-31 01:03:34 +03:00
1 parent dfeed175e9
commit d446e549a6
2 files changed
+4

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ export type FileDto = {
slug: string
name: string
cover?: ImageDto
filepath: string
file: {
name: string
size: number
@@ -22,6 +23,7 @@ export function encodeFile(file: Document): FileDto {
slug: file.id,
cover,
name: file.title,
filepath: file.file,
file: {
type: 'application/pdf',
name: file.fileInfo.name,
+2
View File
@@ -6,6 +6,7 @@ export type ImageDto = {
width: number
height: number
src: string
filepath: string
}
export function encodeImage(image: Image): ImageDto {
@@ -18,5 +19,6 @@ export function encodeImage(image: Image): ImageDto {
src: a.url,
width: a.width,
height: a.height,
filepath: image.file,
}
}