Skip to content

Commit

Permalink
Tech - Envoi d'un header JWT manquant (#3520)
Browse files Browse the repository at this point in the history
## Linked issues

- Le header n'était pas envoyé lors de la mise sous silence des alertes

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron committed Aug 12, 2024
2 parents 86f00bc + 6c1b9fb commit 86e80be
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 86e80be

Please sign in to comment.