refactor(api): update barrel exports

This commit is contained in:
zetaloop
2026-03-01 22:51:03 +08:00
parent 83ea3fea97
commit 05c5d05148
2 changed files with 5 additions and 10 deletions
+5 -5
View File
@@ -2,18 +2,18 @@ export { login, register, resetPassword } from "./auth"
export { sendForgotPasswordCode } from "./auth-extra" export { sendForgotPasswordCode } from "./auth-extra"
export { getChatSessionById, listChatMessages, listChatSessions } from "./chat" export { getChatSessionById, listChatMessages, listChatSessions } from "./chat"
export { requestWithAuth } from "./client" export { requestWithAuth } from "./client"
export { addComment, listComments, listCommentsByPost, toggleCommentLike } from "./comments" export { addComment, listCommentsByPost, toggleCommentLike } from "./comments"
export { getDisputeByOrderId, listDisputes } from "./disputes" export { getDisputeByOrderId, listDisputes } from "./disputes"
export { sendEmailVerificationCode } from "./email" export { sendEmailVerificationCode } from "./email"
export { isFavorited, listFavorites, listFavoritesByUser } from "./favorites" export { isFavorited, listFavorites } from "./favorites"
export { getFileById } from "./files" export { getFileById } from "./files"
export { getGameById, listGames } from "./games" export { getGameById, listGames } from "./games"
export { addNotification, listNotifications, markNotificationAsRead } from "./notifications" export { listNotifications, markNotificationAsRead } from "./notifications"
export { getOrderById, listOrders, listOrdersByConsumer } from "./orders" export { getOrderById, listOrders, listOrdersByConsumer } from "./orders"
export { getPlayerById, listPlayers, listPlayersByShop } from "./players" export { getPlayerById, listPlayers, listPlayersByShop } from "./players"
export { getPostById, listPosts, listPostsByAuthor, togglePostLike } from "./posts" export { getPostById, listPosts, listPostsByAuthor, togglePostLike } from "./posts"
export { listReviews, listReviewsByOrder, listReviewsByTargetUser } from "./reviews" export { listReviews, listReviewsByOrder, listReviewsByTargetUser } from "./reviews"
export { getServiceById, listServices, listServicesByPlayer } from "./services" export { getServiceById, listServices, listServicesByPlayer } from "./services"
export { getShopById, getShopByOwnerId, listShops } from "./shops" export { getShopById, getShopByOwnerId, listShops } from "./shops"
export { listTransactions } from "./transactions" export { getWalletBalance, listWalletTransactions } from "./transactions"
export { getCurrentUserForLogin, getUserById, listUsers } from "./users" export { getCurrentUserForLogin, getUserById } from "./users"
-5
View File
@@ -1,12 +1,7 @@
import { httpJson } from "@/lib/api/http" import { httpJson } from "@/lib/api/http"
import { isApiError } from "@/lib/errors" import { isApiError } from "@/lib/errors"
import { mockUsers } from "@/lib/mock"
import type { User } from "@/lib/types" import type { User } from "@/lib/types"
export function listUsers() {
return mockUsers
}
export async function getUserById(userId: string): Promise<User | undefined> { export async function getUserById(userId: string): Promise<User | undefined> {
try { try {
return await httpJson<User>(`/api/v1/users/${userId}`) return await httpJson<User>(`/api/v1/users/${userId}`)