mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-15 13:14:37 +00:00
17 lines
510 B
TypeScript
17 lines
510 B
TypeScript
import { IFunctionRouteHandler } from 'wherehows-web/typings/ember-cli-mirage';
|
|
import { ApiStatus } from 'wherehows-web/utils/api/shared';
|
|
|
|
/**
|
|
* Returns a config object for the config endpoint
|
|
* @param {object} config the config table / factory object
|
|
* @return {{status: ApiStatus, config: object}}
|
|
*/
|
|
const getConfig = function(this: IFunctionRouteHandler, { configs }: { configs: any }) {
|
|
return {
|
|
status: ApiStatus.OK,
|
|
config: this.serialize(configs.first())
|
|
};
|
|
};
|
|
|
|
export { getConfig };
|