Skip to content

Commit 07ab7c4

Browse files
committed
fmt and lint
1 parent 75c310d commit 07ab7c4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

coderd/inboxnotifications.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ func (api *API) listInboxNotifications(rw http.ResponseWriter, r *http.Request)
206206
ctx = r.Context()
207207
apikey = httpmw.APIKey(r)
208208

209-
targets = p.UUIDs(vals, []uuid.UUID{}, "targets")
210-
templates = p.UUIDs(vals, []uuid.UUID{}, "templates")
209+
targets = p.UUIDs(vals, nil, "targets")
210+
templates = p.UUIDs(vals, nil, "templates")
211211
readStatus = p.String(vals, "all", "read_status")
212212
startingBefore = p.UUID(vals, uuid.Nil, "starting_before")
213213
)
@@ -296,7 +296,7 @@ func (api *API) updateInboxNotificationReadStatus(rw http.ResponseWriter, r *htt
296296

297297
notificationID, ok := httpmw.ParseUUIDParam(rw, r, "id")
298298
if !ok {
299-
299+
return
300300
}
301301

302302
var body codersdk.UpdateInboxNotificationReadStatusRequest

codersdk/inboxnotification.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ type ListInboxNotificationsResponse struct {
4747

4848
func ListInboxNotificationsRequestToQueryParams(req ListInboxNotificationsRequest) []RequestOption {
4949
var opts []RequestOption
50-
if len(req.Targets) > 0 {
50+
if req.Targets != "" {
5151
opts = append(opts, WithQueryParam("targets", req.Targets))
5252
}
53-
if len(req.Templates) > 0 {
53+
if req.Templates != "" {
5454
opts = append(opts, WithQueryParam("templates", req.Templates))
5555
}
5656
if req.ReadStatus != "" {

site/src/api/typesGenerated.ts

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

0 commit comments

Comments
 (0)