feat: remove console.log

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-06-29 15:40:14 +08:00
parent 6780791747
commit 120a7771fe

View File

@ -1,13 +1,15 @@
import { getNamespacesMetadata, getNamespaceMetadata, getNamespaceListenerMetadata } from './utils' import { TYPE } from './constants'
import { interfaces } from './interfaces'
import { getContainer } from '@cc-server/ioc'
import { getNamespaceMetadata, getNamespaceListenerMetadata } from './utils'
export function getNamespaceInfo() { export function getNamespaceInfo() {
let namespaces = getNamespacesMetadata(); let namespaces = getContainer().getAll<interfaces.Namespace>(TYPE.Namespace)
console.log(namespaces)
return namespaces.map(namespace => { return namespaces.map(namespace => {
let listenerMetadata = getNamespaceListenerMetadata(namespace.target); let namespaceMetadata = getNamespaceMetadata(namespace);
console.log(namespace, listenerMetadata) let listenerMetadata = getNamespaceListenerMetadata(namespace);
return { return {
namespace: namespace.name, namespace: namespaceMetadata.name,
listeners: listenerMetadata.map(listener => { listeners: listenerMetadata.map(listener => {
return { return {
event: listener.name, event: listener.name,