MCPcopy Index your code
hub / github.com/coder/coder / InsertWebpushSubscription

Method InsertWebpushSubscription

coderd/database/querier.go:1012–1012  ·  view source on GitHub ↗

Inserts or updates a webpush subscription. The (user_id, endpoint) pair is unique; re-subscribing the same endpoint replaces the keys instead of inserting a duplicate row. This is the recovery path after a PWA reinstall on iOS, where the browser may keep the same endpoint with rotated keys.

(ctx context.Context, arg InsertWebpushSubscriptionParams)

Source from the content-addressed store, hash-verified

1010 // inserting a duplicate row. This is the recovery path after a PWA reinstall
1011 // on iOS, where the browser may keep the same endpoint with rotated keys.
1012 InsertWebpushSubscription(ctx context.Context, arg InsertWebpushSubscriptionParams) (WebpushSubscription, error)
1013 InsertWorkspace(ctx context.Context, arg InsertWorkspaceParams) (WorkspaceTable, error)
1014 InsertWorkspaceAgent(ctx context.Context, arg InsertWorkspaceAgentParams) (WorkspaceAgent, error)
1015 InsertWorkspaceAgentDevcontainers(ctx context.Context, arg InsertWorkspaceAgentDevcontainersParams) ([]WorkspaceAgentDevcontainer, error)

Callers 7

TestPushFunction · 0.65
TestSSRFPreventionFunction · 0.65
TestNotificationsMethod · 0.65
WebpushSubscriptionFunction · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 3

TestPushFunction · 0.52
TestSSRFPreventionFunction · 0.52
TestNotificationsMethod · 0.52