(env: Env, ctx: ExecutionContext)
| 3 | import { updateAxisRegistry, updateVariableList } from './update'; |
| 4 | |
| 5 | export const getVariableList = async (env: Env, ctx: ExecutionContext) => { |
| 6 | const value = await env.METADATA.get<VariableList>( |
| 7 | METADATA_KEYS.variable_list, |
| 8 | { |
| 9 | type: 'json', |
| 10 | cacheTtl: KV_TTL, |
| 11 | }, |
| 12 | ); |
| 13 | |
| 14 | if (!value) { |
| 15 | return await updateVariableList(env, ctx); |
| 16 | } |
| 17 | |
| 18 | return value; |
| 19 | }; |
| 20 | |
| 21 | export const getVariableId = async ( |
| 22 | id: string, |
no test coverage detected