mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-06 16:15:34 +00:00
Basic handler for diff rendering
This commit is contained in:
@@ -801,6 +801,16 @@ def changedetection_app(config=None, datastore_o=None):
|
||||
logs=notification_debug_log if len(notification_debug_log) else ["No errors or warnings detected"])
|
||||
|
||||
return output
|
||||
|
||||
# render an image which contains the diff of two images
|
||||
@app.route("/diff/image/<string:uuid>/<string:first_date>/<string:second_date>")
|
||||
def render_diff_image(uuid, first_date, second_date):
|
||||
from flask import make_response
|
||||
resp = make_response("xxxxx")
|
||||
resp.headers['Content-Type'] = 'image/jpeg'
|
||||
return resp
|
||||
|
||||
|
||||
@app.route("/api/<string:uuid>/snapshot/current", methods=['GET'])
|
||||
@login_required
|
||||
def api_snapshot(uuid):
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<div id="diff-ui">
|
||||
|
||||
<img src="{{ url_for('render_diff_image', uuid=uuid, first_date=versions[0], second_date=current_previous_version) }}" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user