From 38e7acf5ea1f3627fb51aae1c7d1ee3a45ee2695 Mon Sep 17 00:00:00 2001 From: balzack Date: Tue, 25 Oct 2022 08:58:12 -0700 Subject: [PATCH] added missing file --- app/mobile/src/api/getCard.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/mobile/src/api/getCard.js diff --git a/app/mobile/src/api/getCard.js b/app/mobile/src/api/getCard.js new file mode 100644 index 00000000..33bc59e0 --- /dev/null +++ b/app/mobile/src/api/getCard.js @@ -0,0 +1,9 @@ +import { checkResponse, fetchWithTimeout } from './fetchUtil'; + +export async function getCard(server, token, cardId) { + let param = "?agent=" + token + let card = await fetchWithTimeout(`https://${server}/contact/cards/${cardId}${param}`, { method: 'GET' }); + checkResponse(card); + return await card.json() +} +