mirror of
https://github.com/unraid/api.git
synced 2026-01-13 03:59:58 -06:00
18 lines
429 B
TypeScript
18 lines
429 B
TypeScript
/*!
|
|
* Copyright 2019-2020 Lime Technology Inc. All rights reserved.
|
|
* Written by: Alexis Tyler
|
|
*/
|
|
|
|
import { CoreContext, CoreResult } from '../../types';
|
|
|
|
/**
|
|
* Get internal context object.
|
|
*/
|
|
export const getContext = (context: CoreContext): CoreResult => {
|
|
return {
|
|
text: `Context: ${JSON.stringify(context, null, 2)}`,
|
|
json: context,
|
|
html: `<h1>Context</h1>\n<pre>${JSON.stringify(context, null, 2)}</pre>`
|
|
};
|
|
};
|