/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { ScheduledScript } from '~/models/scheduled-task/scheduled-script'; import { APIContext } from '../utils/api-context'; import { makeGetOneScheduledTask } from './get-one-scheduled-task'; export const makeGetOneScheduledScript = ( context: APIContext, ): ((scheduledTaskID: string) => Promise) => { const getOneScheduledTask = makeGetOneScheduledTask(context); return (scheduledTaskID: string): Promise => getOneScheduledTask<'script'>(scheduledTaskID); };