handle(); return $this->jsonSuccess(['profile' => $profile]); } /** * @Get("/account", name="api.uc.account") */ public function accountAction() { $service = new AccountInfoService(); $account = $service->handle(); return $this->jsonSuccess(['account' => $account]); } /** * @Get("/courses", name="api.uc.courses") */ public function coursesAction() { $service = new CourseListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/articles", name="api.uc.articles") */ public function articlesAction() { $service = new ArticleListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/questions", name="api.uc.questions") */ public function questionsAction() { $service = new QuestionListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/answers", name="api.uc.answers") */ public function answersAction() { $service = new AnswerListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/favorites", name="api.uc.favorites") */ public function favoritesAction() { $service = new FavoriteListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/consults", name="api.uc.consults") */ public function consultsAction() { $service = new ConsultListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/reviews", name="api.uc.reviews") */ public function reviewsAction() { $service = new ReviewListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/orders", name="api.uc.orders") */ public function ordersAction() { $service = new OrderListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/refunds", name="api.uc.refunds") */ public function refundsAction() { $service = new RefundListService(); $pager = $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/notifications", name="api.uc.notifications") */ public function notificationsAction() { $service = new NotificationListService(); $pager = $service->handle(); $service = new NotificationReadService(); $service->handle(); return $this->jsonPaginate($pager); } /** * @Get("/notify/stats", name="api.uc.notify_stats") */ public function notifyStatsAction() { $service = new NotifyStatsService(); $stats = $service->handle(); return $this->jsonSuccess(['stats' => $stats]); } /** * @Post("/profile/update", name="api.uc.update_profile") */ public function updateProfileAction() { $service = new ProfileUpdateService(); $service->handle(); return $this->jsonSuccess(); } /** * @Post("/online", name="api.uc.online") */ public function onlineAction() { $service = new OnlineService(); $service->handle(); return $this->jsonSuccess(); } }