Prettier.

This commit is contained in:
Jesse Brault 2026-01-29 18:11:15 -06:00
parent c02e78d27d
commit aa28f8d100
5 changed files with 26 additions and 28 deletions

View File

@ -148,7 +148,7 @@ export class RecipeUploadPage implements OnInit {
protected async onDeleteDraft(): Promise<void> { protected async onDeleteDraft(): Promise<void> {
await this.recipeDraftService.deleteDraft(this.model().draft!.id); await this.recipeDraftService.deleteDraft(this.model().draft!.id);
await this.queryClient.invalidateQueries({ await this.queryClient.invalidateQueries({
queryKey: ['recipe-upload', 'in-progress-drafts'] queryKey: ['recipe-upload', 'in-progress-drafts'],
}); });
await this.switchModel( await this.switchModel(
{ {

View File

@ -2,9 +2,9 @@ export interface EnterRecipeDataSubmitEvent {
title: string; title: string;
slug: string; slug: string;
ingredients: Array<{ ingredients: Array<{
amount: string | null, amount: string | null;
name: string, name: string;
notes: string | null, notes: string | null;
}>; }>;
rawText: string; rawText: string;
} }

View File

@ -174,13 +174,14 @@ export class EnterRecipeData implements OnInit {
this.submit.emit({ this.submit.emit({
title: value.title!, title: value.title!,
slug: value.slug!, slug: value.slug!,
ingredients: value.ingredients?.map(ingredient => ({ ingredients:
value.ingredients?.map((ingredient) => ({
amount: ingredient.amount ?? null, amount: ingredient.amount ?? null,
name: ingredient.name!, name: ingredient.name!,
notes: ingredient.notes ?? null, notes: ingredient.notes ?? null,
})) ?? [], })) ?? [],
rawText: value.text! rawText: value.text!,
}) });
} }
protected onDraftDelete(): void { protected onDraftDelete(): void {

View File

@ -8,9 +8,8 @@ describe('Logo', () => {
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
imports: [Logo] imports: [Logo],
}) }).compileComponents();
.compileComponents();
fixture = TestBed.createComponent(Logo); fixture = TestBed.createComponent(Logo);
component = fixture.componentInstance; component = fixture.componentInstance;

View File

@ -105,9 +105,7 @@ export class RecipeDraftService {
} }
public deleteDraft(id: string): Promise<void> { public deleteDraft(id: string): Promise<void> {
return firstValueFrom( return firstValueFrom(this.http.delete<void>(this.endpointService.getUrl('recipeDrafts', [id])));
this.http.delete<void>(this.endpointService.getUrl('recipeDrafts', [id]))
);
} }
public doInference(model: RecipeUploadClientModel): Observable<RecipeUploadClientModel> { public doInference(model: RecipeUploadClientModel): Observable<RecipeUploadClientModel> {