First frontend commit
Change-Id: Ieab79fc7bf553cdce5384dadcdc03695c357eace
diff --git a/frontend/my-app/src/mocks/handlers.js b/frontend/my-app/src/mocks/handlers.js
new file mode 100644
index 0000000..72ba049
--- /dev/null
+++ b/frontend/my-app/src/mocks/handlers.js
@@ -0,0 +1,17 @@
+import { rest } from 'msw';
+
+export const handlers = [
+ rest.get('/api/resources', (req, res, ctx) => {
+ return res(ctx.json([
+ { id: 1, title: 'Ubuntu 22.04 ISO', description: 'Linux 镜像' }
+ ]));
+ }),
+
+ rest.get('/api/user/123', (req, res, ctx) => {
+ return res(ctx.json({
+ id: 123,
+ name: 'Test User',
+ avatar: 'https://example.com/avatar.jpg'
+ }));
+ }),
+];