diff --git a/api/text.ts b/api/text.ts index 09683d3..18e469c 100644 --- a/api/text.ts +++ b/api/text.ts @@ -28,7 +28,7 @@ export async function getEnsTextRecords( return records } -export default async function ensTextApi( +export async function ensTextApi( request: VercelRequest, response: VercelResponse ) { diff --git a/test/api.test.ts b/test/api.test.ts index 3556095..5992385 100644 --- a/test/api.test.ts +++ b/test/api.test.ts @@ -1,7 +1,7 @@ import addressApi from '../api/address' import nameApi from '../api/name' import profileApi from '../api/profile' -import textApi from '../api/text' +import { ensTextApi } from '../api/text' import { createServer } from 'vercel-node-server' import listen from 'test-listen' // import express from 'express' @@ -42,7 +42,7 @@ describe('Testing ENS proxy API endpoints', function () { assert(response.data.name === name) }) it('Requesting text records should return the expected response', async () => { - server = createServer(textApi) + server = createServer(ensTextApi) url = await listen(server) const response = await axios.get(url, { params: { @@ -115,7 +115,7 @@ describe('Testing ENS proxy API endpoints', function () { assert(response.status === 200) }) it('Requesting text records should return status 200 with invalid name', async () => { - server = createServer(textApi) + server = createServer(ensTextApi) url = await listen(server) const response = await axios.get(url, { params: {