refactor: optional metadata field (for file upload only)
This commit is contained in:
parent
17b70e8d5e
commit
bc13f0e5ce
4 changed files with 22 additions and 34 deletions
|
|
@ -78,10 +78,10 @@ export class SubFolderFileController extends Controller {
|
|||
@Body()
|
||||
body: {
|
||||
file: string;
|
||||
title: string;
|
||||
description: string;
|
||||
category: string;
|
||||
keyword: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
category?: string;
|
||||
keyword?: string;
|
||||
},
|
||||
@Path() cabinetName: string,
|
||||
@Path() drawerName: string,
|
||||
|
|
@ -122,10 +122,10 @@ export class SubFolderFileController extends Controller {
|
|||
fileName: body.file,
|
||||
fileSize: 0,
|
||||
fileType: "",
|
||||
title: body.title,
|
||||
description: body.description,
|
||||
category: body.category.split(","),
|
||||
keyword: body.keyword.split(","),
|
||||
title: body.title ?? "",
|
||||
description: body.description ?? "",
|
||||
category: body.category?.split(",") ?? [],
|
||||
keyword: body.keyword?.split(",") ?? [],
|
||||
upload: false,
|
||||
createdAt: new Date().toISOString(),
|
||||
createdBy: rec ? rec.createdBy : "n/a",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue