Changeset e071d30 for src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts
- Timestamp:
- 11/09/21 17:07:49 (3 years ago)
- Branches:
- dev
- Children:
- fcc3080
- Parents:
- 53bebc0 (diff), 6165fd0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts
r53bebc0 re071d30 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.