From e3e60546e01955441962dc398f987c1cf2bd1f0d Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Thu, 19 Oct 2023 02:05:04 -0700 Subject: [PATCH] spark api now lives at https://api.filspark.com/ (#37) --- lib/spark.js | 4 ++-- test/integration.js | 2 +- test/spark.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/spark.js b/lib/spark.js index 20d426c..47e71f7 100644 --- a/lib/spark.js +++ b/lib/spark.js @@ -16,7 +16,7 @@ export default class Spark { async getRetrieval () { console.log('Getting retrieval...') - const res = await this.#fetch('https://spark.fly.dev/rounds/current', { + const res = await this.#fetch('https://api.filspark.com/rounds/current', { method: 'GET', headers: { 'Content-Type': 'application/json' } }) @@ -111,7 +111,7 @@ export default class Spark { participantAddress: Zinnia.walletAddress } console.log('%o', payload) - const res = await this.#fetch('https://spark.fly.dev/measurements', { + const res = await this.#fetch('https://api.filspark.com/measurements', { method: 'POST', body: JSON.stringify(payload), headers: { diff --git a/test/integration.js b/test/integration.js index 22c7978..21ed586 100644 --- a/test/integration.js +++ b/test/integration.js @@ -5,7 +5,7 @@ import { assert } from 'zinnia:assert' test('integration', async () => { const spark = new Spark() const measurementId = await spark.nextRetrieval() - const res = await fetch(`https://spark.fly.dev/measurements/${measurementId}`) + const res = await fetch(`https://api.filspark.com/measurements/${measurementId}`) assert(res.ok) const retrieval = await res.json() assert(retrieval.startAt) diff --git a/test/spark.js b/test/spark.js index 54fde92..4809602 100644 --- a/test/spark.js +++ b/test/spark.js @@ -36,7 +36,7 @@ test('getRetrieval', async () => { const retrieval = await spark.getRetrieval() assertArrayIncludes(round.retrievalTasks, [retrieval]) assertEquals(requests, [{ - url: 'https://spark.fly.dev/rounds/current', + url: 'https://api.filspark.com/rounds/current', opts: { method: 'GET', headers: { 'Content-Type': 'application/json' } @@ -120,7 +120,7 @@ test('submitRetrieval', async () => { await spark.submitMeasurement({ cid: 'bafytest' }, {}) assertEquals(requests, [ { - url: 'https://spark.fly.dev/measurements', + url: 'https://api.filspark.com/measurements', opts: { method: 'POST', body: JSON.stringify({