File upload functionality for own interiors (#39)

This commit is contained in:
Niklas Fondberg
2021-09-13 13:38:53 +02:00
committed by GitHub
parent 0a4be2b081
commit 84bed9a7ce
15 changed files with 2275 additions and 4 deletions
+12
View File
@@ -4,6 +4,7 @@ import {
ProductListResult,
ProductsFilterInput,
} from '../types/product-types';
import * as CONFIG from '../config';
import { CategoryAPI } from '../datasources/category-api';
import { Category } from '../types/category-types';
import { KeywordAPI } from '../datasources/keyword-api';
@@ -11,6 +12,7 @@ import { Keyword } from '../types/keyword-types';
import { MarketLocaleAPI } from '../datasources/market-locale-api';
import { InteriorAPI } from '../datasources/interior-api';
import { InteriorsLambdaAPI } from '../datasources/interiors-lambda-api';
import { IdNumberResult } from '../types/types';
const ProductBlacklist = {
async market(parent, _args, { dataSources }) {
@@ -127,6 +129,16 @@ export const productMutationTypeDefs = {
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
async addOwnInteriorToPrintProduct(
_,
{ printId, uploadedS3Key },
{ dataSources },
): Promise<IdNumberResult> {
return (<InteriorAPI>dataSources.interiorApi).addOwnUploadToPrintId(
printId,
uploadedS3Key,
);
},
async productWallpaperType(
_,
{ productId, wallpaperTypes },