Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix metrics sending
Browse files Browse the repository at this point in the history
  • Loading branch information
tharaldyo committed Aug 15, 2023
1 parent 964bbee commit 912bb10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/metrikker/iatjenester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BASE_PATH } from '../konstanter';

export type Virksomhet = { orgnr: string };

export const sendteMetrikker: Virksomhet[] = [{ orgnr: '' }];
export const sendteMetrikker: Virksomhet[] = [];

interface IaTjenesteMetrikk {
orgnr: string;
Expand Down Expand Up @@ -52,8 +52,7 @@ const post = async (iatjeneste: IaTjenesteMetrikk) => {
};
try {
const fetchResponse = await fetch(`${iaTjenesterMetrikkerApiUrl}`, settings);
const data = await fetchResponse.json();
return data.status === 'created';
return fetchResponse.status === 201;
} catch (e) {
return false;
}
Expand Down

0 comments on commit 912bb10

Please sign in to comment.