Skip to content

Instantly share code, notes, and snippets.

@mccraigmccraig
Created September 29, 2017 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mccraigmccraig/30912c19c88c3c9f297da2574e3d3faf to your computer and use it in GitHub Desktop.
Save mccraigmccraig/30912c19c88c3c9f297da2574e3d3faf to your computer and use it in GitHub Desktop.
(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