We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 273a7b8 commit 7779b55Copy full SHA for 7779b55
api/views/stories.py
@@ -176,13 +176,14 @@ def get_stories(poi_id):
176
d = {'status': 'success', 'story_ids': arr}
177
return jsonify(d)
178
179
-@app.route('/stories/edit/multiple/<poi_id>', methods= ['POST'])
+@app.route('/stories/edit/multiple', methods= ['POST'])
180
def edit_stories_with_poi(poi_id):
181
try:
182
- poi = PointsOfInterest.query.get(poi_id)
+ json_dict = json.loads(request.data)
183
+ poi = PointsOfInterest.query.get(json_dict["poi_id"])
184
if not poi:
185
raise InvalidUsage('Error: ' + str(ex), status_code=404)
- json_dict = json.loads(request.data)
186
+
187
for story_id in json_dict["stories"]:
188
story = StoryNames.query.get(story_id)
189
if not story:
0 commit comments