kopia lustrzana https://github.com/Stopka/fedicrawl
14 wiersze
353 B
TypeScript
14 wiersze
353 B
TypeScript
import { ElasticClient } from '../ElasticClient'
|
|
import Node from '../Definitions/Node'
|
|
import nodeIndex from '../Definitions/nodeIndex'
|
|
|
|
const getNode = async (elastic:ElasticClient, domain:string):Promise<Node> => {
|
|
const result = await elastic.get<Node>({
|
|
index: nodeIndex,
|
|
id: domain
|
|
})
|
|
return result._source
|
|
}
|
|
|
|
export default getNode
|