chore: add new route for the restore from trash
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user