14 lines
284 B
TypeScript
14 lines
284 B
TypeScript
/**
|
|
* Creates a base message for use in JSON responses
|
|
*
|
|
* @param error the error status
|
|
* @param message the message to show
|
|
* @returns the base message
|
|
*/
|
|
export function baseMessage(error: boolean, message: string) {
|
|
return {
|
|
error: error,
|
|
message: message,
|
|
};
|
|
}
|