@vreippainen/hevy-mcp-server
Version:
A MCP server for Hevy
27 lines • 751 B
JavaScript
/**
* Utility functions for API responses
*/
/**
* Creates a standardized error response object
* @param message The error message to include in the response
*/
export function createErrorResponse(message) {
return createResponse({ success: false, message });
}
/**
* Creates a standardized response object
* @param data The data to include in the response
*/
export function createResponse(data) {
return {
content: [{ type: 'text', text: JSON.stringify(data) }],
};
}
/**
* Creates a standardized success response object
* @param data The data to include in the response
*/
export function createSuccessResponse(data) {
return createResponse({ success: true, ...data });
}
//# sourceMappingURL=responseUtils.js.map