mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
docs: fix mock error (#40436)
This commit is contained in:
parent
08a457c60e
commit
a8f9d1af61
@ -180,9 +180,11 @@ let products: Product[] = [
|
||||
];
|
||||
|
||||
export default defineMock({
|
||||
'GET /api/products': {
|
||||
'GET /api/products': (_, res) => {
|
||||
res.send({
|
||||
status: 'ok',
|
||||
data: products,
|
||||
});
|
||||
},
|
||||
'DELETE /api/products/:id': (req, res) => {
|
||||
products = products.filter((item) => item.id !== req.params.id);
|
||||
|
@ -180,9 +180,11 @@ let products: Product[] = [
|
||||
];
|
||||
|
||||
export default defineMock({
|
||||
'GET /api/products': {
|
||||
'GET /api/products': (_, res) => {
|
||||
res.send({
|
||||
status: 'ok',
|
||||
data: products,
|
||||
});
|
||||
},
|
||||
'DELETE /api/products/:id': (req, res) => {
|
||||
products = products.filter((item) => item.id !== req.params.id);
|
||||
|
Loading…
Reference in New Issue
Block a user