mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
21 lines
330 B
TypeScript
21 lines
330 B
TypeScript
import { DDO } from '../../src/lib'
|
|
|
|
const responsify = async (data) => ({
|
|
ok: true,
|
|
json: () => Promise.resolve(data)
|
|
})
|
|
|
|
const getSearchResults = (
|
|
results: DDO[],
|
|
page = 0,
|
|
total_pages = 1,
|
|
total_results = 1
|
|
): any => ({
|
|
results,
|
|
page,
|
|
total_pages,
|
|
total_results
|
|
})
|
|
|
|
export { responsify, getSearchResults }
|