diff --git a/src/app/pages/recipe-upload-page/recipe-upload-page.ts b/src/app/pages/recipe-upload-page/recipe-upload-page.ts index c2c688d..453d7b6 100644 --- a/src/app/pages/recipe-upload-page/recipe-upload-page.ts +++ b/src/app/pages/recipe-upload-page/recipe-upload-page.ts @@ -148,7 +148,7 @@ export class RecipeUploadPage implements OnInit { protected async onDeleteDraft(): Promise { await this.recipeDraftService.deleteDraft(this.model().draft!.id); await this.queryClient.invalidateQueries({ - queryKey: ['recipe-upload', 'in-progress-drafts'] + queryKey: ['recipe-upload', 'in-progress-drafts'], }); await this.switchModel( { diff --git a/src/app/pages/recipe-upload-page/steps/enter-recipe-data/EnterRecipeDataSubmitEvent.ts b/src/app/pages/recipe-upload-page/steps/enter-recipe-data/EnterRecipeDataSubmitEvent.ts index 95156ea..a7fbc6e 100644 --- a/src/app/pages/recipe-upload-page/steps/enter-recipe-data/EnterRecipeDataSubmitEvent.ts +++ b/src/app/pages/recipe-upload-page/steps/enter-recipe-data/EnterRecipeDataSubmitEvent.ts @@ -2,9 +2,9 @@ export interface EnterRecipeDataSubmitEvent { title: string; slug: string; ingredients: Array<{ - amount: string | null, - name: string, - notes: string | null, + amount: string | null; + name: string; + notes: string | null; }>; rawText: string; } diff --git a/src/app/pages/recipe-upload-page/steps/enter-recipe-data/enter-recipe-data.ts b/src/app/pages/recipe-upload-page/steps/enter-recipe-data/enter-recipe-data.ts index 4354d73..3456af0 100644 --- a/src/app/pages/recipe-upload-page/steps/enter-recipe-data/enter-recipe-data.ts +++ b/src/app/pages/recipe-upload-page/steps/enter-recipe-data/enter-recipe-data.ts @@ -174,13 +174,14 @@ export class EnterRecipeData implements OnInit { this.submit.emit({ title: value.title!, slug: value.slug!, - ingredients: value.ingredients?.map(ingredient => ({ - amount: ingredient.amount ?? null, - name: ingredient.name!, - notes: ingredient.notes ?? null, - })) ?? [], - rawText: value.text! - }) + ingredients: + value.ingredients?.map((ingredient) => ({ + amount: ingredient.amount ?? null, + name: ingredient.name!, + notes: ingredient.notes ?? null, + })) ?? [], + rawText: value.text!, + }); } protected onDraftDelete(): void { diff --git a/src/app/shared/components/logo/logo.spec.ts b/src/app/shared/components/logo/logo.spec.ts index ae7a775..d738e99 100644 --- a/src/app/shared/components/logo/logo.spec.ts +++ b/src/app/shared/components/logo/logo.spec.ts @@ -3,21 +3,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Logo } from './logo'; describe('Logo', () => { - let component: Logo; - let fixture: ComponentFixture; + let component: Logo; + let fixture: ComponentFixture; - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [Logo] - }) - .compileComponents(); + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Logo], + }).compileComponents(); - fixture = TestBed.createComponent(Logo); - component = fixture.componentInstance; - await fixture.whenStable(); - }); + fixture = TestBed.createComponent(Logo); + component = fixture.componentInstance; + await fixture.whenStable(); + }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should create', () => { + expect(component).toBeTruthy(); + }); }); diff --git a/src/app/shared/services/RecipeDraftService.ts b/src/app/shared/services/RecipeDraftService.ts index 8a9b81a..1437566 100644 --- a/src/app/shared/services/RecipeDraftService.ts +++ b/src/app/shared/services/RecipeDraftService.ts @@ -105,9 +105,7 @@ export class RecipeDraftService { } public deleteDraft(id: string): Promise { - return firstValueFrom( - this.http.delete(this.endpointService.getUrl('recipeDrafts', [id])) - ); + return firstValueFrom(this.http.delete(this.endpointService.getUrl('recipeDrafts', [id]))); } public doInference(model: RecipeUploadClientModel): Observable {