refactor(mock): remove lib/mock fixtures and empty stores
This commit is contained in:
+1
-2
@@ -8,7 +8,6 @@ import { allow, deny } from "@/lib/decision"
|
||||
import { evaluateOrderTransition, type OrderAction } from "@/lib/domain/order-machine"
|
||||
import type { ApiDecision } from "@/lib/errors"
|
||||
import { generateId } from "@/lib/id"
|
||||
import { mockOrders } from "@/lib/mock"
|
||||
import type { Order, OrderStatus } from "@/lib/types"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
import { useChatStore } from "@/store/chat"
|
||||
@@ -301,7 +300,7 @@ export const useOrderStore = create<OrderState>((set, get) => {
|
||||
}
|
||||
|
||||
return {
|
||||
orders: mockOrders,
|
||||
orders: [],
|
||||
createOrder: (input, actor) => {
|
||||
if (actor.role !== "consumer") {
|
||||
return { decision: deny(403, "仅客户可下单") }
|
||||
|
||||
Reference in New Issue
Block a user