2020-12-30 05:07:16 +01:00
|
|
|
import define from '../define';
|
2021-03-23 06:54:09 +01:00
|
|
|
import { redisClient } from '../../../db/redis';
|
2021-03-23 09:43:07 +01:00
|
|
|
import config from '@/config';
|
2020-12-30 05:07:16 +01:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['meta'],
|
|
|
|
|
|
|
|
requireCredential: false as const,
|
|
|
|
|
|
|
|
params: {
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default define(meta, (ps, user) => {
|
|
|
|
return new Promise((res, rej) => {
|
2021-03-23 06:54:09 +01:00
|
|
|
redisClient.pubsub('numsub', config.host, (_, x) => {
|
2020-12-30 05:07:16 +01:00
|
|
|
res({
|
|
|
|
count: x[1]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|