Browse Source

chore(server): Remove unused variable, fix ts error

Michael Bromley 7 years ago
parent
commit
fe05f44e4b

+ 1 - 1
server/src/api/config/graphql-config.service.ts

@@ -40,7 +40,7 @@ export class GraphqlConfigService implements GqlOptionsFactory {
                 DateTime: GraphQLDateTime,
                 Node: dummyResolveType,
                 PaginatedList: dummyResolveType,
-                Upload: GraphQLUpload,
+                Upload: GraphQLUpload || dummyResolveType,
             },
             uploads: {
                 maxFileSize: this.configService.assetOptions.uploadMaxFileSize,

+ 0 - 5
server/src/service/helpers/translatable-saver/translation-differ.ts

@@ -30,11 +30,6 @@ export class TranslationDiffer<Entity extends Translatable> {
     ): TranslationDiff<Entity> {
         if (updated) {
             const translationEntities = this.translationInputsToEntities(updated, existing);
-
-            // TODO: deletion should be made more explicit that simple omission
-            // from the update array. This would lead to accidental deletion.
-            // const toDelete = existing.filter(not(foundIn(translationEntities, 'languageCode')));
-            const toDelete = [];
             const toAdd = translationEntities.filter(not(foundIn(existing, 'languageCode')));
             const toUpdate = translationEntities.filter(foundIn(existing, 'languageCode'));