mirror of
https://github.com/coder/coder.git
synced 2025-03-14 10:09:57 +00:00
fmt and lint
This commit is contained in:
@ -206,8 +206,8 @@ func (api *API) listInboxNotifications(rw http.ResponseWriter, r *http.Request)
|
|||||||
ctx = r.Context()
|
ctx = r.Context()
|
||||||
apikey = httpmw.APIKey(r)
|
apikey = httpmw.APIKey(r)
|
||||||
|
|
||||||
targets = p.UUIDs(vals, []uuid.UUID{}, "targets")
|
targets = p.UUIDs(vals, nil, "targets")
|
||||||
templates = p.UUIDs(vals, []uuid.UUID{}, "templates")
|
templates = p.UUIDs(vals, nil, "templates")
|
||||||
readStatus = p.String(vals, "all", "read_status")
|
readStatus = p.String(vals, "all", "read_status")
|
||||||
startingBefore = p.UUID(vals, uuid.Nil, "starting_before")
|
startingBefore = p.UUID(vals, uuid.Nil, "starting_before")
|
||||||
)
|
)
|
||||||
@ -296,7 +296,7 @@ func (api *API) updateInboxNotificationReadStatus(rw http.ResponseWriter, r *htt
|
|||||||
|
|
||||||
notificationID, ok := httpmw.ParseUUIDParam(rw, r, "id")
|
notificationID, ok := httpmw.ParseUUIDParam(rw, r, "id")
|
||||||
if !ok {
|
if !ok {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var body codersdk.UpdateInboxNotificationReadStatusRequest
|
var body codersdk.UpdateInboxNotificationReadStatusRequest
|
||||||
|
@ -47,10 +47,10 @@ type ListInboxNotificationsResponse struct {
|
|||||||
|
|
||||||
func ListInboxNotificationsRequestToQueryParams(req ListInboxNotificationsRequest) []RequestOption {
|
func ListInboxNotificationsRequestToQueryParams(req ListInboxNotificationsRequest) []RequestOption {
|
||||||
var opts []RequestOption
|
var opts []RequestOption
|
||||||
if len(req.Targets) > 0 {
|
if req.Targets != "" {
|
||||||
opts = append(opts, WithQueryParam("targets", req.Targets))
|
opts = append(opts, WithQueryParam("targets", req.Targets))
|
||||||
}
|
}
|
||||||
if len(req.Templates) > 0 {
|
if req.Templates != "" {
|
||||||
opts = append(opts, WithQueryParam("templates", req.Templates))
|
opts = append(opts, WithQueryParam("templates", req.Templates))
|
||||||
}
|
}
|
||||||
if req.ReadStatus != "" {
|
if req.ReadStatus != "" {
|
||||||
|
8
site/src/api/typesGenerated.ts
generated
8
site/src/api/typesGenerated.ts
generated
@ -1161,10 +1161,10 @@ export interface LinkConfig {
|
|||||||
|
|
||||||
// From codersdk/inboxnotification.go
|
// From codersdk/inboxnotification.go
|
||||||
export interface ListInboxNotificationsRequest {
|
export interface ListInboxNotificationsRequest {
|
||||||
readonly Targets: readonly string[];
|
readonly targets?: string;
|
||||||
readonly Templates: readonly string[];
|
readonly templates?: string;
|
||||||
readonly ReadStatus: string;
|
readonly read_status?: string;
|
||||||
readonly StartingBefore: string;
|
readonly starting_before?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// From codersdk/inboxnotification.go
|
// From codersdk/inboxnotification.go
|
||||||
|
Reference in New Issue
Block a user