Commit 27eea3a5 authored by Sean Arnold's avatar Sean Arnold

Add links to incident with details path

parent b0e53a2a
...@@ -9,9 +9,14 @@ module StatusPage ...@@ -9,9 +9,14 @@ module StatusPage
expose :updated_at expose :updated_at
expose :created_at expose :created_at
expose :user_notes, as: :comments, using: IncidentCommentEntity expose :user_notes, as: :comments, using: IncidentCommentEntity
expose :links
private private
def links
{ details: StatusPage::Storage.details_path(object.iid) }
end
def user_notes def user_notes
Array(options[:user_notes]) Array(options[:user_notes])
end end
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"state", "state",
"title", "title",
"description", "description",
"links",
"updated_at", "updated_at",
"created_at" "created_at"
], ],
...@@ -16,6 +17,13 @@ ...@@ -16,6 +17,13 @@
}, },
"title": { "type": "string" }, "title": { "type": "string" },
"description": { "type": "string" }, "description": { "type": "string" },
"links": {
"type": "object",
"properties": {
"details": { "type": "string" }
},
"additionalProperties": false
},
"updated_at": { "type": "date" }, "updated_at": { "type": "date" },
"created_at": { "type": "date" } "created_at": { "type": "date" }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment