|
1 | 1 | import { Request, Response } from "express"; |
2 | 2 | import _ from "lodash"; |
3 | 3 | import { ResponseHandler } from "../../helpers/ResponseHandler"; |
4 | | -import { datasetService } from "../../services/DatasetService"; |
| 4 | +import { datasetService, validateStorageSupport } from "../../services/DatasetService"; |
5 | 5 | import { schemaValidation } from "../../services/ValidationService"; |
6 | 6 | import StatusTransitionSchema from "./RequestValidationSchema.json"; |
7 | 7 | import ReadyToPublishSchema from "./ReadyToPublishSchema.json" |
@@ -88,6 +88,7 @@ const deleteDataset = async (dataset: Record<string, any>) => { |
88 | 88 | const readyForPublish = async (dataset: Record<string, any>, updated_by: any) => { |
89 | 89 |
|
90 | 90 | const draftDataset: any = await datasetService.getDraftDataset(dataset.dataset_id) |
| 91 | + validateStorageSupport(draftDataset); |
91 | 92 | let defaultConfigs: any = _.cloneDeep(defaultDatasetConfig) |
92 | 93 | defaultConfigs = _.omit(defaultConfigs, ["router_config"]) |
93 | 94 | defaultConfigs = _.omit(defaultConfigs, "dedup_config.dedup_key"); |
@@ -136,6 +137,7 @@ const readyForPublish = async (dataset: Record<string, any>, updated_by: any) => |
136 | 137 | const publishDataset = async (dataset: Record<string, any>, userID: any) => { |
137 | 138 |
|
138 | 139 | const draftDataset: Record<string, any> = await datasetService.getDraftDataset(dataset.dataset_id) as unknown as Record<string, any> |
| 140 | + validateStorageSupport(draftDataset); |
139 | 141 | _.set(draftDataset, ["created_by"], userID); |
140 | 142 | _.set(draftDataset, ["updated_by"], userID); |
141 | 143 | await validateAndUpdateDenormConfig(draftDataset); |
|
0 commit comments