Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d37dbe

Browse files
committed
push notification -> webpush
1 parent1acd123 commit5d37dbe

File tree

40 files changed

+701
-704
lines changed

40 files changed

+701
-704
lines changed

‎cli/server_regenerate_vapid_keypair_test.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestRegenerateVapidKeypair(t *testing.T) {
3636

3737
db:=database.New(sqlDB)
3838
// Ensure there is no existing VAPID keypair.
39-
rows,err:=db.GetNotificationVAPIDKeys(ctx)
39+
rows,err:=db.GetWebpushVAPIDKeys(ctx)
4040
require.NoError(t,err)
4141
require.Empty(t,rows)
4242

@@ -48,13 +48,13 @@ func TestRegenerateVapidKeypair(t *testing.T) {
4848
clitest.Start(t,inv)
4949

5050
pty.ExpectMatchContext(ctx,"Regenerating VAPID keypair...")
51-
pty.ExpectMatchContext(ctx,"This will delete all existingpush notification subscriptions.")
51+
pty.ExpectMatchContext(ctx,"This will delete all existingwebpush subscriptions.")
5252
pty.ExpectMatchContext(ctx,"Are you sure you want to continue? (y/N)")
5353
pty.WriteLine("y")
5454
pty.ExpectMatchContext(ctx,"VAPID keypair regenerated successfully.")
5555

5656
// Ensure the VAPID keypair was created.
57-
keys,err:=db.GetNotificationVAPIDKeys(ctx)
57+
keys,err:=db.GetWebpushVAPIDKeys(ctx)
5858
require.NoError(t,err)
5959
require.NotEmpty(t,keys.VapidPublicKey)
6060
require.NotEmpty(t,keys.VapidPrivateKey)
@@ -79,7 +79,7 @@ func TestRegenerateVapidKeypair(t *testing.T) {
7979
u:=dbgen.User(t,db, database.User{})
8080
// Insert a few fake push subscriptions for each user.
8181
forj:=0;j<10;j++ {
82-
_=dbgen.NotificationPushSubscription(t,db, database.InsertNotificationPushSubscriptionParams{
82+
_=dbgen.WebpushSubscription(t,db, database.InsertWebpushSubscriptionParams{
8383
UserID:u.ID,
8484
})
8585
}
@@ -93,20 +93,20 @@ func TestRegenerateVapidKeypair(t *testing.T) {
9393
clitest.Start(t,inv)
9494

9595
pty.ExpectMatchContext(ctx,"Regenerating VAPID keypair...")
96-
pty.ExpectMatchContext(ctx,"This will delete all existingpush notification subscriptions.")
96+
pty.ExpectMatchContext(ctx,"This will delete all existingwebpush subscriptions.")
9797
pty.ExpectMatchContext(ctx,"Are you sure you want to continue? (y/N)")
9898
pty.WriteLine("y")
9999
pty.ExpectMatchContext(ctx,"VAPID keypair regenerated successfully.")
100100

101101
// Ensure the VAPID keypair was created.
102-
keys,err:=db.GetNotificationVAPIDKeys(ctx)
102+
keys,err:=db.GetWebpushVAPIDKeys(ctx)
103103
require.NoError(t,err)
104104
require.NotEmpty(t,keys.VapidPublicKey)
105105
require.NotEmpty(t,keys.VapidPrivateKey)
106106

107107
// Ensure the push subscriptions were deleted.
108108
varcountint64
109-
rows,err:=sqlDB.QueryContext(ctx,"SELECT COUNT(*) FROMnotification_push_subscriptions")
109+
rows,err:=sqlDB.QueryContext(ctx,"SELECT COUNT(*) FROMwebpush_subscriptions")
110110
require.NoError(t,err)
111111
t.Cleanup(func() {
112112
_=rows.Close()

‎coderd/apidoc/docs.go‎

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/coderd.go‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -577,16 +577,16 @@ func New(options *Options) *API {
577577
api.AppearanceFetcher.Store(&f)
578578
api.PortSharer.Store(&portsharing.DefaultPortSharer)
579579
buildInfo:= codersdk.BuildInfoResponse{
580-
ExternalURL:buildinfo.ExternalURL(),
581-
Version:buildinfo.Version(),
582-
AgentAPIVersion:AgentAPIVersionREST,
583-
ProvisionerAPIVersion:proto.CurrentVersion.String(),
584-
DashboardURL:api.AccessURL.String(),
585-
WorkspaceProxy:false,
586-
UpgradeMessage:api.DeploymentValues.CLIUpgradeMessage.String(),
587-
DeploymentID:api.DeploymentID,
588-
PushNotificationsPublicKey:api.PushNotifier.PublicKey(),
589-
Telemetry:api.Telemetry.Enabled(),
580+
ExternalURL:buildinfo.ExternalURL(),
581+
Version:buildinfo.Version(),
582+
AgentAPIVersion:AgentAPIVersionREST,
583+
ProvisionerAPIVersion:proto.CurrentVersion.String(),
584+
DashboardURL:api.AccessURL.String(),
585+
WorkspaceProxy:false,
586+
UpgradeMessage:api.DeploymentValues.CLIUpgradeMessage.String(),
587+
DeploymentID:api.DeploymentID,
588+
WebPushPublicKey:api.PushNotifier.PublicKey(),
589+
Telemetry:api.Telemetry.Enabled(),
590590
}
591591
api.SiteHandler=site.New(&site.Options{
592592
BinFS:binFS,
@@ -1201,8 +1201,8 @@ func New(options *Options) *API {
12011201
r.Put("/",api.putUserNotificationPreferences)
12021202
})
12031203
r.Route("/push",func(r chi.Router) {
1204-
r.Post("/subscription",api.postUserPushNotificationSubscription)
1205-
r.Delete("/subscription",api.deleteUserPushNotificationSubscription)
1204+
r.Post("/subscription",api.postUserWebpushSubscription)
1205+
r.Delete("/subscription",api.deleteUserWebpushSubscription)
12061206
r.Post("/test",api.postUserPushNotificationTest)
12071207
})
12081208
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp