Skip to content

Commit

Permalink
fix: url issue
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Sep 17, 2024
1 parent 35fc671 commit 53e2cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/web/components/modals/DatasetExternal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ const DatasetExternal: React.FC<DatasetExternalProps> = ({ open, onClose, projec
// eslint-disable-next-line @typescript-eslint/no-explicit-any

const handleNext = () => {
console.log(selectedDatasets);
// STEP 0: Parse URL.
if (activeStep === 0) {
if (!externalUrl) return;
Expand Down Expand Up @@ -555,6 +554,7 @@ const DatasetExternal: React.FC<DatasetExternalProps> = ({ open, onClose, projec
data_type: capabilities.type,
url: externalUrl,
other_properties: {
url: externalUrl,
layers: [selectedDatasets[0].Name],
srs: selectedDatasets[0].DefaultCRS,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/validations/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const layerMetadataSchema = contentMetadataSchema.extend({
});

export const otherPropertiesSchmea = z.object({
url: z.string().optional(), // metadata url
layers: z.array(z.string()).optional(),
srs: z.string().optional(),
width: z.number().optional(), // width of the image (only for external imagery)
Expand Down Expand Up @@ -240,7 +241,6 @@ export const createLayerFromDatasetSchema = createLayerBaseSchema.extend({
});

export const externalDatasetFeatureUrlSchema = z.object({
url: z.string().url(),
data_type: dataType,
other_properties: otherPropertiesSchmea,
});
Expand Down

0 comments on commit 53e2cb8

Please sign in to comment.