Skip to content

Commit 0a15cbc

Browse files
authored
[ENG-10695] Non-spam deleted items showing as spam (#921)
- Ticket: [ENG-10695] - Feature flag: n/a ## Summary of Changes 1. Changed check to flagged content.
1 parent 474c08f commit 0a15cbc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/features/preprints/services/preprints.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class PreprintsService {
100100
.pipe(
101101
map((response) => PreprintsMapper.fromPreprintWithEmbedsJsonApi(response)),
102102
catchError((error) => {
103-
if (error.status === 410) {
103+
if (error.error?.errors?.[0]?.meta?.flagged_content) {
104104
this.router.navigate(['/spam-content']);
105105
}
106106
return throwError(() => error);

src/app/shared/services/resource.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class ResourceGuidService {
6363
),
6464
finalize(() => this.loaderService.hide()),
6565
catchError((error) => {
66-
if (error.status === 410) {
66+
if (error.error?.errors?.[0]?.meta?.flagged_content) {
6767
this.router.navigate(['/spam-content']);
6868
}
6969
return throwError(() => error);

0 commit comments

Comments
 (0)