Make action links external

This commit is contained in:
Joel Collins 2020-02-12 13:52:57 +00:00
parent ae7846887d
commit 19b0101718

View file

@ -1,7 +1,7 @@
"""
Top-level representation of enabled actions
"""
from flask import url_for
from . import camera, stage, system
from labthings.server.view import View
@ -74,7 +74,7 @@ class ActionsView(View):
d = {
"links": {
"self": {
"href": current_labthing().url_for(action["view_class"]),
"href": url_for(action["view_class"].endpoint, _external=True),
"mimetype": "application/json",
**description_from_view(action["view_class"]),
}