UNPKG

cnpmjs.org

Version:

Private npm registry and web for Enterprise, base on MySQL and Simple Store Service

30 lines (24 loc) 511 B
/**! * list packages by username * * Copyright(c) cnpmjs.org and other contributors. * MIT Licensed * * Authors: * fengmk2 <m@fengmk2.com> (http://fengmk2.com) */ 'use strict'; /** * Module dependencies. */ const packageService = require('../../../services/package'); module.exports = function*() { const username = this.params.user; const packages = yield packageService.listModulesByUser(username); this.body = { user: { name: username, }, packages: packages, }; };