httpInnerApi.js 976 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * 房间管理http接口
  3. */
  4. 'use strict';
  5. var F = require('../common/function');
  6. var C = require('../config/index');
  7. var _ = require('underscore');
  8. _.str = require('underscore.string');
  9. _.v = require('validator');
  10. var co = require('co');
  11. module.exports = function (app) {
  12. var mgr_map = app.common_mgr.mgr_map;
  13. var http_app = app.app;
  14. http_app.regRequest('/iminnerapi/:apiVer/sendMsg', function* (ctx) {
  15. yield F.checkParamsNull(ctx, "socket_list,content,route");
  16. let socket_list = ctx.I.socket_list;
  17. let content = JSON.parse(ctx.I.content); // 不捕获异常了 返回什么错误就什么错误
  18. let route = ctx.I.route;
  19. });
  20. http_app.regRequest('/imroom/:apiVer/delZegoStream', function* (ctx) {
  21. yield F.checkParamsNull(ctx, "room_id,uid");
  22. let room_id = ctx.I.room_id;
  23. let uid = ctx.I.uid;
  24. yield mgr_map.extrn.delZegoStream(room_id, uid);
  25. F.setResJson(ctx, 0);
  26. });
  27. };