Changes in src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts [9df3069:6165fd0]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts
r9df3069 r6165fd0 19 19 AnswerQuestion, 20 20 AnswerQuestionSuccess, 21 DeleteAnswer, 22 DeleteAnswerResponse, 23 DeleteAnswerResponseSuccess, 24 DeleteAnswerSuccess, 21 25 EditAnswerQuestion, 22 26 EditAnswerQuestionSuccess, … … 236 240 ); 237 241 }); 242 243 deleteResponseToAnswer$ = createEffect(() => { 244 return this.actions$.pipe( 245 ofType<DeleteAnswerResponse>(QuestionActionTypes.DeleteAnswerResponse), 246 mergeMap((action) => { 247 return this.api 248 .delete<string>(`v1/questions/${action.questionUid}/answers/${action.answerUid}/answerresponses/${action.answerResponseUid}`) 249 .pipe( 250 tap((state) => this.notification.successNotification('success-delete-answer-response')), 251 switchMap((state) => [new DeleteAnswerResponseSuccess(state, action.answerUid), new EffectFinishedWorking()]), 252 catchError((err) => [new EffectFinishedWorkingError(err)]) 253 ); 254 }) 255 ); 256 }); 257 258 deleteAnswer$ = createEffect(() => { 259 return this.actions$.pipe( 260 ofType<DeleteAnswer>(QuestionActionTypes.DeleteAnswer), 261 mergeMap((action) => { 262 return this.api.delete<string>(`v1/questions/${action.questionUid}/answers/${action.answerUid}`).pipe( 263 tap((state) => this.notification.successNotification('success-delete-answer')), 264 switchMap((state) => [new DeleteAnswerSuccess(state), new EffectFinishedWorking()]), 265 catchError((err) => [new EffectFinishedWorkingError(err)]) 266 ); 267 }) 268 ); 269 }); 238 270 }
Note:
See TracChangeset
for help on using the changeset viewer.