Skip to content

Commit

Permalink
chore(edit-content): apply format
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Dec 18, 2024
1 parent be975f3 commit dc901c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import { of } from 'rxjs';

import { formatDate } from '@angular/common';

import { DotContentSearchService, DotFieldService, DotLanguagesService } from '@dotcms/data-access';
import {
DotContentSearchService,
DotFieldService,
DotHttpErrorManagerService,
DotLanguagesService
} from '@dotcms/data-access';
import { DotCMSContentlet, DotCMSContentTypeField } from '@dotcms/dotcms-models';

import { RelationshipFieldService } from './relationship-field.service';
Expand All @@ -26,6 +31,9 @@ describe('RelationshipFieldService', () => {
const createService = createServiceFactory({
service: RelationshipFieldService,
providers: [
mockProvider(DotHttpErrorManagerService, {
handle: () => of(null)
}),
mockProvider(DotFieldService),
mockProvider(DotContentSearchService),
mockProvider(DotLanguagesService, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import { Injectable, inject } from '@angular/core';

import { catchError, map, pluck } from 'rxjs/operators';


import { DotContentSearchService, DotFieldService, DotHttpErrorManagerService, DotLanguagesService } from '@dotcms/data-access';
import {
DotContentSearchService,
DotFieldService,
DotHttpErrorManagerService,
DotLanguagesService
} from '@dotcms/data-access';
import { DotCMSContentlet, DotCMSContentTypeField } from '@dotcms/dotcms-models';
import { RelationshipFieldItem } from '@dotcms/edit-content/fields/dot-edit-content-relationship-field/models/relationship.models';

Expand All @@ -17,7 +21,6 @@ import {
} from '../dot-edit-content-relationship-field.constants';
import { Column } from '../models/column.model';


type LanguagesMap = Record<number, string>;

@Injectable({
Expand Down Expand Up @@ -49,7 +52,9 @@ export class RelationshipFieldService {
* @param contentTypeId The content type ID
* @returns Observable of [Column[], RelationshipFieldItem[]]
*/
getColumnsAndContent(contentTypeId: string): Observable<[Column[], RelationshipFieldItem[]] | null> {
getColumnsAndContent(
contentTypeId: string
): Observable<[Column[], RelationshipFieldItem[]] | null> {
return forkJoin([
this.getColumns(contentTypeId),
this.getContent(contentTypeId),
Expand All @@ -60,9 +65,7 @@ export class RelationshipFieldService {
this.#matchColumnsWithContent(columns, content, languages)
]),
catchError((error: HttpErrorResponse) => {
return this.#httpErrorManagerService.handle(error).pipe(
map(() => null)
);
return this.#httpErrorManagerService.handle(error).pipe(map(() => null));
})
);
}
Expand Down

0 comments on commit dc901c0

Please sign in to comment.