Skip to content

Commit

Permalink
Fixing type issue on unnamedFeature model
Browse files Browse the repository at this point in the history
  • Loading branch information
sdl60660 committed Jan 6, 2022
1 parent 9269237 commit 68e9348
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion name_server/src/models/unnamedFeature.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const mongoose = require("mongoose");

const unamedFeatureSchema = new mongoose.Schema({
nameid: {
levelpathid: {
type: Number,
required: true,
},
Expand Down
4 changes: 1 addition & 3 deletions src/components/utils/mapUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export const sendQueryData = async (lat, lng, startingSearch, query_error = fals
};

export const sendUnnamedFeatureData = async (startCoordinates, featureNames) => {
console.log({ featureNames });

// Get list of unidentified, unique features
const unidentifiedFeatures = featureNames
.filter((d) => d.includes("Unidentified River "))
Expand All @@ -35,7 +33,7 @@ export const sendUnnamedFeatureData = async (startCoordinates, featureNames) =>
console.log({ unidentifiedFeatures });

const featureData = unidentifiedFeatures.map((feature) => ({
name_id: feature.split("Unidentified River ")[1],
levelpathid: Number(feature.split("Unidentified River ")[1]),
current_name: feature,
route_start: JSON.stringify(startCoordinates),
}));
Expand Down

1 comment on commit 68e9348

@vercel
Copy link

@vercel vercel bot commented on 68e9348 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.