New decorator function @TypedFormData.Body()
for multipart/form-data
content typed requeest body.
https://nestia.io/docs/core/TypedFormData/
import { TypedFormData, TypedRoute } from "@nestia/core";
import { Controller } from "@nestjs/common";
@Controller("bbs/articles")
export class BbsArticlesController {
@TypedRoute.Post()
public async create(
@TypedFormData.Body() input: IBbsArticleCreate,
): Promise<void> {
input;
}
}
interface IBbsArticleCreate {
title: string;
body: string | null;
thumbnail?: File | undefined;
files: File[];
tags: string[];
}
What's Changed
- Close #763 -
@TypedMultipart.Body()
by @samchon in #779 - Determine the new decorator name as
@TypedFormData.Body()
by @samchon in #780 - Roll
@nestia/migrate
back to theexrpess
for@TypedFormData.Body()
by @samchon in #781
Full Changelog: v2.5.1...v2.5.3