Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
indexers
editorial-content
Commits
67af7ba4
Commit
67af7ba4
authored
Jul 09, 2019
by
Alessandro CERIONI
Browse files
Removed dead code
parent
4ffee32a
Changes
1
Hide whitespace changes
Inline
Side-by-side
api.py
View file @
67af7ba4
...
...
@@ -29,26 +29,6 @@ if __name__ != '__main__':
def
hello
():
return
render_template
(
'index.html'
)
# @api.route("/index/posts", defaults={'the_post_id': None})
# @api.route("/index/posts/<string:the_post_id>")
# def index_posts(the_post_id):
# task_url = main(the_post_id)
# return jsonify( {'reindex_task_url': task_url} )
@
api
.
route
(
"/test"
,
methods
=
[
'GET'
])
def
test
():
api
.
logger
.
info
(
'***TEST***'
)
test_log
()
# data = request.data.decode('utf-8') # data is empty
# #print(dir(request.data))
# json_data = json.loads(data)
# with open('output/output.json', 'w') as fp:
# json.dump(json_data, fp)
# #print( json.dumps(json_data, indent=4) )
# need posted data here
return
jsonify
(
{
'status'
:
'OK'
}
)
@
api
.
route
(
"/index/posts"
,
methods
=
[
'GET'
])
def
_index_posts
():
task_url
=
index_everything
(
cfg
,
'posts'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment