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/packages/rocketchat-api/server/v1/misc.js

32 lines
634 B

RocketChat.API.v1.addRoute('info', { authRequired: false }, {
get: function() {
if (this.request.headers['x-user-id'] != null && RocketChat.authz.hasRole(this.request.headers['x-user-id'], 'admin')) {
return {
info: RocketChat.Info
};
}
return RocketChat.API.v1.success({
info: {
'version': RocketChat.Info.version
}
});
}
});
RocketChat.API.v1.addRoute('me', { authRequired: true }, {
get: function() {
return RocketChat.API.v1.success(_.pick(this.user, [
'_id',
'name',
'emails',
'status',
'statusConnection',
'username',
'utcOffset',
'active',
'language'
]));
}
});