MCPcopy Create free account
hub / github.com/buggregator/server / handleCursor

Function handleCursor

modules/smtp/api.go:54–59  ·  view source on GitHub ↗

handleCursor returns the current server time as a cursor token. E2E tests grab the cursor before triggering an action, then pass it as `since` to the search / wait endpoints to avoid picking up stale messages.

()

Source from the content-addressed store, hash-verified

52// E2E tests grab the cursor before triggering an action, then pass it as
53// `since` to the search / wait endpoints to avoid picking up stale messages.
54func handleCursor() http.HandlerFunc {
55 return func(w http.ResponseWriter, r *http.Request) {
56 cursor := time.Now().UTC().Format(time.RFC3339Nano)
57 smtpJSON(w, map[string]string{"cursor": cursor})
58 }
59}
60
61// handleMessages returns SMTP messages matching the given filter.
62func handleMessages(store event.Store) http.HandlerFunc {

Callers 1

registerSMTPAPIFunction · 0.85

Calls 1

smtpJSONFunction · 0.85

Tested by

no test coverage detected