chore: add new route for the restore from trash

This commit is contained in:
mahyargdz
2025-07-12 12:17:49 +03:30
parent 352cdde13f
commit 97383d25f6
3 changed files with 51 additions and 0 deletions
+9
View File
@@ -190,4 +190,13 @@ export class EmailController {
moveMessageToInboxFromFavorite(@UserDec("wildduckUserId") userId: string, @Param() params: MessageParamDto) {
return this.emailService.moveMessageToInboxFromFavorite(userId, Number(params.messageId));
}
@Patch("messages/:messageId/restore")
@ApiOperation({ summary: "Restore a message from trash back to inbox" })
@ApiResponse({ status: 200, description: "Message restored from trash to inbox successfully" })
@ApiResponse({ status: 404, description: "Message not found in trash" })
@ApiResponse({ status: 403, description: "Not authorized to restore message" })
moveMessageToInboxFromTrash(@UserDec("wildduckUserId") userId: string, @Param() params: MessageParamDto) {
return this.emailService.moveMessageToInboxFromTrash(userId, Number(params.messageId));
}
}