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/apps/meteor/ee/server/requestSeatsRoute.ts

17 lines
547 B

import type { IncomingMessage, ServerResponse } from 'http';
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';
import { Analytics } from '@rocket.chat/core-services';
import { getSeatsRequestLink } from '../app/license/server/getSeatsRequestLink';
Meteor.startup(() => {
WebApp.connectHandlers.use('/requestSeats/', async (_: IncomingMessage, res: ServerResponse) => {
const url = await getSeatsRequestLink();
await Analytics.saveSeatRequest();
res.writeHead(302, { Location: url });
res.end();
});
});