@@ -15,10 +15,10 @@ const options = {
1515 method : 'GET' ,
1616 url : `poll/${ pollId } /options` ,
1717 params : { time : + new Date ( ) } ,
18- cancelToken :
18+ signal :
1919 cancelTokenHandlerObject [
2020 this . getOptions . name
21- ] . handleRequestCancellation ( ) . token ,
21+ ] . handleRequestCancellation ( ) . signal ,
2222 } )
2323 } ,
2424
@@ -39,10 +39,10 @@ const options = {
3939 url : `poll/${ pollId } /option` ,
4040 // data: { ...option },
4141 data : { option, sequence, voteYes } ,
42- cancelToken :
42+ signal :
4343 cancelTokenHandlerObject [
4444 this . addOption . name
45- ] . handleRequestCancellation ( ) . token ,
45+ ] . handleRequestCancellation ( ) . signal ,
4646 } )
4747 } ,
4848
@@ -51,10 +51,10 @@ const options = {
5151 method : 'PUT' ,
5252 url : `option/${ option . id } ` ,
5353 data : { ...option } ,
54- cancelToken :
54+ signal :
5555 cancelTokenHandlerObject [
5656 this . updateOption . name
57- ] . handleRequestCancellation ( ) . token ,
57+ ] . handleRequestCancellation ( ) . signal ,
5858 } )
5959 } ,
6060
@@ -63,10 +63,10 @@ const options = {
6363 method : 'DELETE' ,
6464 url : `option/${ optionId } ` ,
6565 params : { time : + new Date ( ) } ,
66- cancelToken :
66+ signal :
6767 cancelTokenHandlerObject [
6868 this . deleteOption . name
69- ] . handleRequestCancellation ( ) . token ,
69+ ] . handleRequestCancellation ( ) . signal ,
7070 } )
7171 } ,
7272
@@ -76,10 +76,10 @@ const options = {
7676 url : `option/${ optionId } /restore` ,
7777 params : { time : + new Date ( ) } ,
7878
79- cancelToken :
79+ signal :
8080 cancelTokenHandlerObject [
8181 this . restoreOption . name
82- ] . handleRequestCancellation ( ) . token ,
82+ ] . handleRequestCancellation ( ) . signal ,
8383 } )
8484 } ,
8585
@@ -101,21 +101,21 @@ const options = {
101101 pollId,
102102 text : optionsBatch ,
103103 } ,
104- cancelToken :
104+ signal :
105105 cancelTokenHandlerObject [
106106 this . addOptions . name
107- ] . handleRequestCancellation ( ) . token ,
107+ ] . handleRequestCancellation ( ) . signal ,
108108 } )
109109 } ,
110110
111111 confirmOption ( optionId : number ) : Promise < AxiosResponse < { option : OptionDto } > > {
112112 return httpInstance . request ( {
113113 method : 'PUT' ,
114114 url : `option/${ optionId } /confirm` ,
115- cancelToken :
115+ signal :
116116 cancelTokenHandlerObject [
117117 this . confirmOption . name
118- ] . handleRequestCancellation ( ) . token ,
118+ ] . handleRequestCancellation ( ) . signal ,
119119 } )
120120 } ,
121121
@@ -130,10 +130,10 @@ const options = {
130130 method : 'POST' ,
131131 url : `poll/${ pollId } /options/reorder` ,
132132 data : { options } ,
133- cancelToken :
133+ signal :
134134 cancelTokenHandlerObject [
135135 this . reorderOptions . name
136- ] . handleRequestCancellation ( ) . token ,
136+ ] . handleRequestCancellation ( ) . signal ,
137137 } )
138138 } ,
139139
@@ -147,10 +147,10 @@ const options = {
147147 data : {
148148 sequence,
149149 } ,
150- cancelToken :
150+ signal :
151151 cancelTokenHandlerObject [
152152 this . addOptionsSequence . name
153- ] . handleRequestCancellation ( ) . token ,
153+ ] . handleRequestCancellation ( ) . signal ,
154154 } )
155155 } ,
156156
@@ -166,10 +166,10 @@ const options = {
166166 step,
167167 unit,
168168 } ,
169- cancelToken :
169+ signal :
170170 cancelTokenHandlerObject [
171171 this . shiftOptions . name
172- ] . handleRequestCancellation ( ) . token ,
172+ ] . handleRequestCancellation ( ) . signal ,
173173 } )
174174 } ,
175175}
0 commit comments