Files
api/app/core/modules/services/get-unraid-api.ts
T
Alexis Tyler 4e1b0bd72c chore: lint
2021-01-28 15:45:14 +10:30

25 lines
590 B
TypeScript

/*!
* Copyright 2019-2020 Lime Technology Inc. All rights reserved.
* Written by: Alexis Tyler
*/
import { getNodeService, NodeService } from '../../utils';
import { CoreContext, CoreResult } from '../../types';
const namespace = 'unraid-api';
interface Result extends CoreResult {
json: NodeService;
}
/**
* Get Unraid api service info.
*/
export const getUnraidApiService = async (context: CoreContext): Promise<Result> => {
const service = await getNodeService(context.user, namespace);
return {
text: `Service: ${JSON.stringify(service, null, 2)}`,
json: service
};
};