Skip to content

Commit

Permalink
Fix header sending
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Aug 12, 2024
1 parent 62d9ae7 commit 6c1b9fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/api/alert.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// TODO We could remove the type discrimation normalization step if we had it done on API side.

import ky from 'ky'

import { monitorfishApi, monitorfishApiKy } from './api'
import { ApiError } from '../libs/ApiError'

Expand Down Expand Up @@ -90,7 +88,7 @@ async function silenceAlertFromAPI(
const beforeDateTime = silencedAlertPeriodRequest.beforeDateTime?.toISOString() || ''

Check warning on line 88 in frontend/src/api/alert.ts

View workflow job for this annotation

GitHub Actions / Run frontend unit tests

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator

try {
return await ky
return await monitorfishApiKy
.put(`/bff/v1/operational_alerts/${id}/silence`, {
json: {
beforeDateTime,
Expand Down

0 comments on commit 6c1b9fb

Please sign in to comment.