robot-check-service.js
592 Bytes
'use strict';
const cache = global.yoho.cache.master;
const Promise = require('bluebird');
const co = Promise.coroutine;
const config = global.yoho.config;
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 = `${config.app}:limiter:${remoteIp}`;
return Promise.all([
cache.delAsync(key)
]);
};
module.exports = {
index,
removeBlack
};