The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/api/server/helpers/deprecationWarning.js

14 lines
446 B

import { API } from '../api';
API.helperMethods.set('deprecationWarning', function _deprecationWarning({ endpoint, versionWillBeRemoved, response }) {
const warningMessage = `The endpoint "${ endpoint }" is deprecated and will be removed after version ${ versionWillBeRemoved }`;
console.warn(warningMessage);
if (process.env.NODE_ENV === 'development') {
return {
warning: warningMessage,
...response,
};
}
return response;
});