robot-check-service.js
518 Bytes
'use strict';
const cache = global.yoho.cache.master;
const Promise = require('bluebird');
const co = Promise.coroutine;
const HeaderModel = require('../../../doraemon/models/header');
const index = co(function* (channel) {
const header = yield HeaderModel.requestHeaderData(channel);
return {
headerData: header.headerData
};
});
const removeBlack = (remoteIp) => {
let key = `pc:limiter:${remoteIp}`;
return cache.delAsync(key);
};
module.exports = {
index,
removeBlack
};