fedicrawl/application/src/Storage/Feeds/getFeed.ts

17 wiersze
386 B
TypeScript
Czysty Zwykły widok Historia

2022-09-14 19:16:04 +00:00
import Feed from '../Definitions/Feed'
import { ElasticClient } from '../ElasticClient'
import feedIndex from '../Definitions/feedIndex'
2022-09-18 11:32:25 +00:00
const getFeed = async (
elastic: ElasticClient,
feedFullName: string
): Promise<Feed | undefined> => {
2022-09-14 19:16:04 +00:00
const result = await elastic.get<Feed>({
index: feedIndex,
id: feedFullName
})
return result._source
}
export default getFeed