-
-
Save mccraigmccraig/30912c19c88c3c9f297da2574e3d3faf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defnk org-timeline-posts-resource | |
[cassandra :as app] | |
(-> {:get {:parameters {:path nf-schema/OrgTimelinePostsPathParams | |
:query nf-schema/OrgTimelinePostsQueryParams} | |
:produces #{"application/json"} ; {:posts [nf-schema/TimelinePost] | |
; :timeline-participant nf-schema/TimelineParticipant} | |
:summary "timeline posts for org" | |
:description "Returns all posts on the from specified org timeline" | |
:response (api/api-method-fn app ::nf.api/org-timeline-posts-GET)} | |
:post {:parameters {:path nf-schema/OrgTimelinePostsPathParams | |
:body nf-schema/UpsertTimelinePostBodySchema} ; {:conversation conv-schema/UpsertConversationAndSubTypeSchema} | |
:consumes #{"application/json"} | |
:produces #{"application/json"} ; {:conversation conv-schema/ConversationSchema} | |
:summary "post to org timeline" | |
:description "Creates a new post/conversation on the specified org timeline" | |
:response (api/api-method-fn app ::nf.api/org-timeline-posts-POST)}} | |
util/apply-access-controls | |
resource | |
handler)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment