1
This commit is contained in:
13
server/services/flows/flow_registry.js
Normal file
13
server/services/flows/flow_registry.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { run_amazon_search_detail_reviews_flow } from './amazon/amazon_search_detail_reviews_flow.js';
|
||||
|
||||
const flow_map = {
|
||||
amazon_search_detail_reviews: run_amazon_search_detail_reviews_flow
|
||||
};
|
||||
|
||||
export function get_flow_runner(flow_name) {
|
||||
const fn = flow_map[flow_name];
|
||||
if (!fn) {
|
||||
throw new Error(`未知 flow_name: ${flow_name}`);
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
Reference in New Issue
Block a user