Kind: Constant
Source: packages/common/decorators/http/request-mapping.decorator.ts
Part of: Common
Route handler (method) Decorator. Routes Webdav PROPPATCH requests to the specified path.
Proppatch is a route handler method decorator that maps WebDAV PROPPATCH requests to a specified path. Use it on controller methods that update or modify WebDAV resource properties, following the same routing pattern as other HTTP method decorators.
Definition
tscreateMappingDecorator(RequestMethod.PROPPATCH)
Value
tscreateMappingDecorator(RequestMethod.PROPPATCH)
Diagram
mermaidgraph LR Client[WebDAV Client] -->|PROPPATCH /resource| Router[Application Router] Router -->|Matches path| Decorator[@Proppatch()] Decorator --> Handler[Controller Method] Handler --> Response[WebDAV Response]
Usage
tsimport { Controller } from '@nestjs/common';
import { Proppatch } from '@your-package/common';
@Controller('files')
export class FilesController {
@Proppatch(':path')
async updateProperties() {
// Read and apply WebDAV property updates for the resource.
return {
statusCode: 207,
};
}
}
AI Coding Instructions
- Apply
@Proppatch()only to controller methods intended to handle WebDAVPROPPATCHrequests. - Keep the decorator path relative to the controller-level route prefix.
- Return responses appropriate for WebDAV property updates, such as a
207 Multi-Statusresponse when multiple properties are processed. - Preserve WebDAV request parsing and property-update behavior in the handler or its delegated service; the decorator only performs route mapping.
Was this page helpful?