Skip to content

Commit

Permalink
Aliasing getDefaultForClient() to getDefaultForServer() has no ef…
Browse files Browse the repository at this point in the history
…fect at all #9819

Because is only called in exactly 1 place in the entire project, and that
is within Natural in `getConsolidatedForClient()` which also calls
`getDefaultForServer()`. So aliasing cannot have any effect.
  • Loading branch information
PowerKiKi committed Aug 18, 2023
1 parent b1da677 commit 96789fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
6 changes: 1 addition & 5 deletions client/app/admin/comments/services/comment.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Apollo} from 'apollo-angular';
import {Injectable} from '@angular/core';
import {Literal, NaturalAbstractModelService, NaturalDebounceService} from '@ecodev/natural';
import {NaturalAbstractModelService, NaturalDebounceService} from '@ecodev/natural';
import {
Comment,
CommentInput,
Expand Down Expand Up @@ -44,10 +44,6 @@ export class CommentService extends NaturalAbstractModelService<
);
}

protected override getDefaultForClient(): Literal {
return this.getDefaultForServer();
}

protected override getDefaultForServer(): CommentInput {
return {
description: '',
Expand Down
12 changes: 1 addition & 11 deletions client/app/admin/events/services/event.service.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import {Apollo} from 'apollo-angular';
import {Injectable} from '@angular/core';
import {
formatIsoDateTime,
FormValidators,
Literal,
NaturalAbstractModelService,
NaturalDebounceService,
} from '@ecodev/natural';
import {formatIsoDateTime, FormValidators, NaturalAbstractModelService, NaturalDebounceService} from '@ecodev/natural';
import {
CreateEvent,
CreateEventVariables,
Expand Down Expand Up @@ -42,10 +36,6 @@ export class EventService extends NaturalAbstractModelService<
super(apollo, naturalDebounceService, 'event', eventQuery, eventsQuery, createEvent, updateEvent, deleteEvents);
}

protected override getDefaultForClient(): Literal {
return this.getDefaultForServer();
}

protected override getDefaultForServer(): EventInput {
return {
name: '',
Expand Down
4 changes: 0 additions & 4 deletions client/app/admin/newses/services/news.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ export class NewsService extends NaturalAbstractModelService<
super(apollo, naturalDebounceService, 'news', newsQuery, newsesQuery, createNews, updateNews, deleteNewses);
}

protected override getDefaultForClient(): Literal {
return this.getDefaultForServer();
}

public override getInput(object: Literal): NewsInput | NewsPartialInput {
object.content = object.content || '';
return super.getInput(object);
Expand Down

0 comments on commit 96789fc

Please sign in to comment.