mirror of
https://github.com/unraid/api.git
synced 2026-04-27 10:41:26 -05:00
25 lines
590 B
TypeScript
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
|
|
};
|
|
};
|