Skip to content

Commit ef5759f

Browse files
committed
update doc and remove plaintext format
1 parent 69ba27e commit ef5759f

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

coderd/apidoc/docs.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/inboxnotifications.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ func (api *API) watchInboxNotifications(rw http.ResponseWriter, r *http.Request)
196196
// @Param targets query string false "Comma-separated list of target IDs to filter notifications"
197197
// @Param templates query string false "Comma-separated list of template IDs to filter notifications"
198198
// @Param read_status query string false "Filter notifications by read status. Possible values: read, unread, all"
199+
// @Param starting_before query string false "ID of the last notification from the current page. Notifications returned will be older than the associated one"
199200
// @Success 200 {object} codersdk.ListInboxNotificationsResponse
200201
// @Router /notifications/inbox [get]
201202
func (api *API) listInboxNotifications(rw http.ResponseWriter, r *http.Request) {

coderd/notifications/dispatch/inbox.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/coder/coder/v2/coderd/database/pubsub"
1717
"github.com/coder/coder/v2/coderd/notifications/types"
1818
coderdpubsub "github.com/coder/coder/v2/coderd/pubsub"
19-
markdown "github.com/coder/coder/v2/coderd/render"
2019
"github.com/coder/coder/v2/codersdk"
2120
)
2221

@@ -36,17 +35,7 @@ func NewInboxHandler(log slog.Logger, store InboxStore, ps pubsub.Pubsub) *Inbox
3635
}
3736

3837
func (s *InboxHandler) Dispatcher(payload types.MessagePayload, titleTmpl, bodyTmpl string, _ template.FuncMap) (DeliveryFunc, error) {
39-
subject, err := markdown.PlaintextFromMarkdown(titleTmpl)
40-
if err != nil {
41-
return nil, xerrors.Errorf("render subject: %w", err)
42-
}
43-
44-
htmlBody, err := markdown.PlaintextFromMarkdown(bodyTmpl)
45-
if err != nil {
46-
return nil, xerrors.Errorf("render html body: %w", err)
47-
}
48-
49-
return s.dispatch(payload, subject, htmlBody), nil
38+
return s.dispatch(payload, titleTmpl, bodyTmpl), nil
5039
}
5140

5241
func (s *InboxHandler) dispatch(payload types.MessagePayload, title, body string) DeliveryFunc {

docs/reference/api/notifications.md

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)