import { Application } from 'egg' ; module . exports = ( app ) => { const apiV1Router = app . router . namespace ( '/api/v1' ) ; const { controller , middleware } = app ; const { user , project , web , eventVariate , pageVariate , measure , dimension , group , } = controller ; const jwt = middleware . jwt ( ) ; apiV1Router . get ( '/user/admin' , user . index ) ; apiV1Router . get ( '/user/currentUser' , jwt , user . currentUser ) ; apiV1Router . post ( '/user/register' , user . register ) ; apiV1Router . post ( '/user/login' , user . login ) ; apiV1Router . post ( '/user/logout' , jwt , user . logout ) ; apiV1Router . post ( '/user/setIsUse' , jwt , user . setIsUse ) ; apiV1Router . post ( '/user/delete' , jwt , user . delete ) ; apiV1Router . post ( '/project/add' , jwt , project . addNewProject ) ; apiV1Router . post ( '/project/update' , jwt , project . updateProject ) ; apiV1Router . get ( '/project/getProjectsForUserId' , jwt , project . getProjectsForUserId ) ; apiV1Router . get ( '/project/getProjectsForId' , jwt , project . getProjectsForId ) ; apiV1Router . get ( '/project/web/list' , jwt , project . getWebProjectList ) ; apiV1Router . post ( '/project/deleteUser' , jwt , project . deleteWebProjectUser ) ; apiV1Router . post ( '/project/addUser' , jwt , project . addWebProjectUser ) ; apiV1Router . post ( '/project/delete' , jwt , project . deleteProject ) ; apiV1Router . post ( '/project/handleDaliyEmail' , jwt , project . handleDaliyEmail ) ; apiV1Router . post ( '/eventvariate/get' , jwt , eventVariate . get ) ; apiV1Router . post ( '/eventvariate/set' , jwt , eventVariate . set ) ; apiV1Router . post ( '/eventvariate/delete' , jwt , eventVariate . set ) ; apiV1Router . post ( '/eventvariate/list' , jwt , eventVariate . list ) ; apiV1Router . post ( '/pagevariate/get' , jwt , pageVariate . get ) ; apiV1Router . post ( '/pagevariate/set' , jwt , pageVariate . set ) ; apiV1Router . post ( '/pagevariate/delete' , jwt , pageVariate . set ) ; apiV1Router . post ( '/pagevariate/list' , jwt , pageVariate . list ) ; apiV1Router . post ( '/measure/list' , jwt , measure . list ) ; apiV1Router . post ( '/dimension/list' , jwt , dimension . list ) ; apiV1Router . post ( '/dimension/get' , jwt , dimension . get ) ; apiV1Router . post ( '/group/get' , jwt , group . get ) ; apiV1Router . post ( '/web/error/list' , jwt , web . error . list ) ; apiV1Router . post ( '/web/error/filterList' , jwt , web . error . filterList ) ; } ;