File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 71
71
};
72
72
},
73
73
created () {
74
+ let customActions = {
75
+ softDelete: {
76
+ method: ' DELETE' ,
77
+ url: ' http://localhost:3000/products/{productId}/reviews/{reviewId}?soft=true'
78
+ }
79
+ };
80
+
74
81
let url = ' http://localhost:3000/products/{productId}/reviews/{reviewId}' ;
75
- this .reviewResource = this .$resource (url);
82
+ this .reviewResource = this .$resource (url, {}, customActions );
76
83
77
84
this .getProduct (this .productId )
78
85
.then (product => this .product = product);
108
115
).then (newReview => this .product .reviews .push (newReview));
109
116
},
110
117
deleteReview (review ) {
111
- this .reviewResource .delete ({
118
+ // this.reviewResource.delete({
119
+ this .reviewResource .softDelete ({
112
120
productId: this .product .id ,
113
121
reviewId: review .id
114
122
}).then (
You can’t perform that action at this time.
0 commit comments