1
0
mirror of https://github.com/coder/coder.git synced 2025-03-15 10:17:09 +00:00

fmt and lint

This commit is contained in:
defelmnq
2025-03-13 23:19:37 +00:00
parent 75c310d4d7
commit 07ab7c4064
3 changed files with 9 additions and 9 deletions

@ -206,8 +206,8 @@ func (api *API) listInboxNotifications(rw http.ResponseWriter, r *http.Request)
ctx = r.Context()
apikey = httpmw.APIKey(r)
targets = p.UUIDs(vals, []uuid.UUID{}, "targets")
templates = p.UUIDs(vals, []uuid.UUID{}, "templates")
targets = p.UUIDs(vals, nil, "targets")
templates = p.UUIDs(vals, nil, "templates")
readStatus = p.String(vals, "all", "read_status")
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")
if !ok {
return
}
var body codersdk.UpdateInboxNotificationReadStatusRequest

@ -47,10 +47,10 @@ type ListInboxNotificationsResponse struct {
func ListInboxNotificationsRequestToQueryParams(req ListInboxNotificationsRequest) []RequestOption {
var opts []RequestOption
if len(req.Targets) > 0 {
if req.Targets != "" {
opts = append(opts, WithQueryParam("targets", req.Targets))
}
if len(req.Templates) > 0 {
if req.Templates != "" {
opts = append(opts, WithQueryParam("templates", req.Templates))
}
if req.ReadStatus != "" {

@ -1161,10 +1161,10 @@ export interface LinkConfig {
// From codersdk/inboxnotification.go
export interface ListInboxNotificationsRequest {
readonly Targets: readonly string[];
readonly Templates: readonly string[];
readonly ReadStatus: string;
readonly StartingBefore: string;
readonly targets?: string;
readonly templates?: string;
readonly read_status?: string;
readonly starting_before?: string;
}
// From codersdk/inboxnotification.go