Skip to content

Commit 71dd626

Browse files
committed
Self-review, appeasing CI
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent ee77df8 commit 71dd626

File tree

8 files changed

+39
-39
lines changed

8 files changed

+39
-39
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,11 +1474,11 @@ func (q *querier) GetNotificationMessagesByStatus(ctx context.Context, arg datab
14741474
return q.db.GetNotificationMessagesByStatus(ctx, arg)
14751475
}
14761476

1477-
func (q *querier) GetNotificationTemplateById(ctx context.Context, id uuid.UUID) (database.NotificationTemplate, error) {
1477+
func (q *querier) GetNotificationTemplateByID(ctx context.Context, id uuid.UUID) (database.NotificationTemplate, error) {
14781478
if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceNotificationTemplate); err != nil {
14791479
return database.NotificationTemplate{}, err
14801480
}
1481-
return q.db.GetNotificationTemplateById(ctx, id)
1481+
return q.db.GetNotificationTemplateByID(ctx, id)
14821482
}
14831483

14841484
func (q *querier) GetNotificationTemplatesByKind(ctx context.Context, kind database.NotificationTemplateKind) ([]database.NotificationTemplate, error) {
@@ -3033,12 +3033,12 @@ func (q *querier) UpdateMemberRoles(ctx context.Context, arg database.UpdateMemb
30333033
return q.db.UpdateMemberRoles(ctx, arg)
30343034
}
30353035

3036-
func (q *querier) UpdateNotificationTemplateMethodById(ctx context.Context, arg database.UpdateNotificationTemplateMethodByIdParams) (database.NotificationTemplate, error) {
3036+
func (q *querier) UpdateNotificationTemplateMethodByID(ctx context.Context, arg database.UpdateNotificationTemplateMethodByIDParams) (database.NotificationTemplate, error) {
30373037
// TODO: how to restrict this to admins?
30383038
if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceNotificationTemplate); err != nil {
30393039
return database.NotificationTemplate{}, err
30403040
}
3041-
return q.db.UpdateNotificationTemplateMethodById(ctx, arg)
3041+
return q.db.UpdateNotificationTemplateMethodByID(ctx, arg)
30423042
}
30433043

30443044
func (q *querier) UpdateOAuth2ProviderAppByID(ctx context.Context, arg database.UpdateOAuth2ProviderAppByIDParams) (database.OAuth2ProviderApp, error) {

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2603,7 +2603,7 @@ func (s *MethodTestSuite) TestNotifications() {
26032603
}))
26042604

26052605
// Notification templates
2606-
s.Run("GetNotificationTemplateById", s.Subtest(func(db database.Store, check *expects) {
2606+
s.Run("GetNotificationTemplateByID", s.Subtest(func(db database.Store, check *expects) {
26072607
user := dbgen.User(s.T(), db, database.User{})
26082608
check.Args(user.ID).Asserts(rbac.ResourceNotificationTemplate, policy.ActionRead).
26092609
Errors(dbmem.ErrUnimplemented)
@@ -2613,8 +2613,8 @@ func (s *MethodTestSuite) TestNotifications() {
26132613
Asserts(rbac.ResourceNotificationTemplate, policy.ActionRead).
26142614
Errors(dbmem.ErrUnimplemented)
26152615
}))
2616-
s.Run("UpdateNotificationTemplateMethodById", s.Subtest(func(db database.Store, check *expects) {
2617-
check.Args(database.UpdateNotificationTemplateMethodByIdParams{
2616+
s.Run("UpdateNotificationTemplateMethodByID", s.Subtest(func(db database.Store, check *expects) {
2617+
check.Args(database.UpdateNotificationTemplateMethodByIDParams{
26182618
Method: database.NullNotificationMethod{NotificationMethod: database.NotificationMethodWebhook, Valid: true},
26192619
ID: notifications.TemplateWorkspaceDormant,
26202620
}).Asserts(rbac.ResourceNotificationTemplate, policy.ActionUpdate).

coderd/database/dbmem/dbmem.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,11 +2710,11 @@ func (q *FakeQuerier) GetNotificationMessagesByStatus(_ context.Context, arg dat
27102710
return out, nil
27112711
}
27122712

2713-
func (*FakeQuerier) GetNotificationTemplateById(_ context.Context, _ uuid.UUID) (database.NotificationTemplate, error) {
2713+
func (*FakeQuerier) GetNotificationTemplateByID(_ context.Context, _ uuid.UUID) (database.NotificationTemplate, error) {
27142714
return database.NotificationTemplate{}, ErrUnimplemented
27152715
}
27162716

2717-
func (q *FakeQuerier) GetNotificationTemplatesByKind(ctx context.Context, kind database.NotificationTemplateKind) ([]database.NotificationTemplate, error) {
2717+
func (*FakeQuerier) GetNotificationTemplatesByKind(_ context.Context, _ database.NotificationTemplateKind) ([]database.NotificationTemplate, error) {
27182718
return nil, ErrUnimplemented
27192719
}
27202720

@@ -7546,7 +7546,7 @@ func (q *FakeQuerier) UpdateMemberRoles(_ context.Context, arg database.UpdateMe
75467546
return database.OrganizationMember{}, sql.ErrNoRows
75477547
}
75487548

7549-
func (*FakeQuerier) UpdateNotificationTemplateMethodById(_ context.Context, _ database.UpdateNotificationTemplateMethodByIdParams) (database.NotificationTemplate, error) {
7549+
func (*FakeQuerier) UpdateNotificationTemplateMethodByID(_ context.Context, _ database.UpdateNotificationTemplateMethodByIDParams) (database.NotificationTemplate, error) {
75507550
return database.NotificationTemplate{}, ErrUnimplemented
75517551
}
75527552

coderd/database/dbmetrics/dbmetrics.go

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

coderd/database/dbmock/dbmock.go

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

coderd/database/querier.go

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

coderd/database/queries.sql.go

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

coderd/database/queries/notifications.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ ON CONFLICT (user_id, notification_template_id) DO UPDATE
157157
SET disabled = EXCLUDED.disabled,
158158
updated_at = CURRENT_TIMESTAMP;
159159

160-
-- name: UpdateNotificationTemplateMethodById :one
160+
-- name: UpdateNotificationTemplateMethodByID :one
161161
UPDATE notification_templates
162162
SET method = sqlc.narg('method')::notification_method
163163
WHERE id = @id::uuid
164164
RETURNING *;
165165

166-
-- name: GetNotificationTemplateById :one
166+
-- name: GetNotificationTemplateByID :one
167167
SELECT *
168168
FROM notification_templates
169169
WHERE id = @id::uuid;

0 commit comments

Comments
 (0)