mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 17:11:17 +00:00
Make feedSourceForUser and FeedSourceProviderFn return promises. Use Promise.allSettled to tolerate partial provider failures. Guard concurrent getOrCreate calls with in-flight promise dedup. Return 503 from HTTP handlers when session creation fails. Co-authored-by: Ona <no-reply@ona.com>
10 lines
300 B
TypeScript
10 lines
300 B
TypeScript
import type { FeedSource } from "@aelis/core"
|
|
|
|
export interface FeedSourceProvider {
|
|
feedSourceForUser(userId: string): Promise<FeedSource>
|
|
}
|
|
|
|
export type FeedSourceProviderFn = (userId: string) => Promise<FeedSource>
|
|
|
|
export type FeedSourceProviderInput = FeedSourceProvider | FeedSourceProviderFn
|